From: Adam Berry on 4 Mar 2010 05:30 On 2/25/10 4:37 PM, Hannes Kessler wrote: > What you said works for saving a Mathematica notebook as a package > under a different name and re-opening it in Mathematica. I'll probably > look now more on .m files in Mathematica during package development > and debugging. But when I re-opened the created .m file in the > Workbench I got an error "Could not open the editor. An unexpected > exception was thrown." followed by > > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java: > 3880) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java: > 2405) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) > at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) > at > org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java: > 332) > at > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java: > 493) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java: > 149) > at > org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java: > 113) > at > org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java: > 194) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java: > 110) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java: > 79) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java: > 368) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java: > 179) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > 39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: > 25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) > at org.eclipse.equinox.launcher.Main.run(Main.java:1311) > > I don't know what to do with it. > > Best regards, > Hannes Kessler > > > On 25 Feb., 07:53, John Fultz<jfu...(a)wolfram.com> wrote: > >> If take your notebook and you do... >> >> * File->Save As... >> * Choose "Mathematica Package" under the file type >> * Save as any .m file...but not using the same name as your .nb file (because >> your .nb file is already writing a companion package, and so will keep >> destroying and recreating the like-named package every time you save your >> notebook). >> >> You'll now end up with a package file which has some interesting properties. >> >> * If you open it in Mathematica, it looks much like a notebook, even preserving >> the cell structure and most of the properties of the notebook. >> >> * If you open it in Workbench (or any text editor), it will be completely >> readable, and all of that work you put into commenting your code in Text cells >> will *still* be there in clearly readable comments. >> >> * If you decide to make changes in Workbench (or any text editor), it will be >> pretty clear how to do so without destroying any structure that would allow you >> to reopen the package in the Mathematica front end and continue to see the same >> structure. >> >> When we designed the package editor in Mathematica (i.e., the mode you're put in >> when you open a .m file), one of the chief goals was to have it stream out to a >> file which is completely readable in any text editor, and which can be >> co-developed using any combination of Mathematica, Workbench, and text editor. >> By following this procedure, you'll be making absolutely no irreversible >> commitment to Workbench, and this will allow you to transition as quickly or >> slowly (or not at all) as you wish. >> >> Incidentally, something else which you might wish to know...Mathematica has an >> alternate evaluatable cell style known as "Code" (Alt+8 or Cmd+8). Code is like >> Input, but with the following differences... >> >> * Much less automatic formatting (e.g., auto-indent, auto-line-wrap) >> * InitializationCell->True is set by default >> * Differing background color so you can easily distinguish from Input cells >> >> This can be a much easier and more visible way of tagging package code than >> using the Initialization Cell menu item, and it's the style which is used by the >> package editor for package code by default. >> >> Sincerely, >> >> John Fultz >> jfu...(a)wolfram.com >> User Interface Group >> Wolfram Research, Inc. >> >> On Wed, 24 Feb 2010 06:18:42 -0500 (EST), Hannes Kessler wrote: >> >>> Hello, >>> >> >>> could you give some recommendations for a smooth transition to the >>> workbench for packages developed in a standard mathematica notebook >>> environment? Starting a completely new project in the workbench is >>> one thing, but at least as important is the question how to continue >>> to work on existing packages created previously by other means. Up to >>> now I wrote code in input cells of a mathematica notebook, added >>> explanations in text cells, marked the input cells with package code >>> as initialization cells to create the .m file automatically upon >>> saving the notebook. I never looked into the .m files themselves. >>> Should one / could one import the notebook (or the .m file) to a >>> workbench project, or copy it to a work space directory, or work >>> directly on the files in the user base directory, or what else ... ? >>> >> >>> Are there tutorials deeling with this problem? >>> >> >>> Best regards, >>> Hannes Kessler >>> > > Hello, could you detail how you attempted to open this .m file in the Workbench. If you also send me the .m I can step you through transitioning and starting to work in the workbench. Thanks, Adam Berry Wolfram Workbench Development Team
From: Albert Retey on 5 Mar 2010 04:29 Hi, >> I just realized that there is an extra setting for the help system, in >> Preferences -> Help -> "Open Help Contents" you can choose to open help in an >> external browser. > > Are you talking about something in Mathematica Preferences here, or in > the Mac OS Help System or some other OS? this thread is named Transistion to Wolfram Workbench, so I thought it was clear we are talking about Wolfram Workbench and of course it is the preferences of the workbench that I was talking about... hth, albert
From: David Bailey on 7 Mar 2010 04:03 John Fultz wrote: > If take your notebook and you do... > > * File->Save As... > * Choose "Mathematica Package" under the file type > * Save as any .m file...but not using the same name as your .nb file (because Back at version 6, I started developing code in .m files using the FrontEnd - just as John describes. The editing experience is so good, I never made the next step to using the Workbench! The FrontEnd has some nice features over the Workbench: 1) All the extra Mathematica characters render correctly, rather than as say /[Breve]. 2) You can evaluate the contents of the .m file directly, and any output appears as if you were working in an ordinary notebook, except that it is not stored when you save the file - which I find ideal. Of course, that doesn't stop you pasting such output into a notebook if you need to save it. 3) The format of the .m file is extremely simple, as John has said, and the formatting information is hidden in Mathematica comments, so the ...m file is directly readable with Get[], so it is easy to write utilities, such as a layout utility, that read the .m file as pure text. If only Wolfram would support colours - (* ::Color[1,0,0]:: *), (* :: EndColor:: *) I'd say feel this scheme was perfect - indeed, I don't see why it would not be possible to allow colour in code/input cells. David Bailey http://www.dbaileyconsultancy.co.uk
From: David Bailey on 7 Mar 2010 04:04 Albert Retey wrote: > > > If you are only writing pure mathematica package files, the added value > of the workbench is IMHO limited, it really can help you to save a lot > of work only if you either plan to provide documentation that you want > to integrate into the Documentation Center ...... I have figured out and documented an easy way to integrate documentation into the DC without the use of the workbench. See my website for details. David Bailey http://www.dbaileyconsultancy.co.uk
From: AES on 7 Mar 2010 04:12
In article <hmqiun$sg6$1(a)smc.vnet.net>, Albert Retey <awnl(a)gmx-topmail.de> wrote: > Hi, > > >> I just realized that there is an extra setting for the help system, in > >> Preferences -> Help -> "Open Help Contents" you can choose to open help in > >> an > >> external browser. > > > > Are you talking about something in Mathematica Preferences here, or in > > the Mac OS Help System or some other OS? > > this thread is named Transistion to Wolfram Workbench, so I thought it > was clear we are talking about Wolfram Workbench and of course it is the > preferences of the workbench that I was talking about... > > hth, Yes, it does, thanks. To pursue the inquiry a bit further, Workbench seems to be called an "environment" -- a term that may have varied meanings. Would it also be properly called an "app"? As an operational question, if you Open Workbench on a Mac, does "Workbench" appear just the right of the Apple Menu in the menu bar? |