# Tag Info

57

You can put your Mathematica session in debug mode by going to Evaluation->Debugger Then, make some definitions and wrap the profiled code in RuntimeToolsProfile For example, in debug mode, run f[x_] := x^2 Table[f[x], {100000}]; // RuntimeToolsProfile and you get a nice As @acl mentioned in the comments, clicking in the gray area in the output ...

34

This is tested on Windows and Linux: Download and install a 32bit version of Eclipse Kepler from http://www.eclipse.org/downloads/ On Linux x86_64 make sure to have 32bit Java installed and configured, and, e.g. on Fedora do: yum install glibc.i686 libgcc.i686 gtk2.i686 libXtst.i686 Start Eclipse and go to Help/Install New Software Click Add Enter ...

30

Preamble: Using git to version control your Mathematica projects is a good choice and you will not regret it. However, like with most tools, it has its own learning curve, the difficulty of which will depend on how comfortable you are with using unix style command line tools. While the basics of git are easy to learn and use (especially if you're a single ...

17

Preamble I feel that this question deserves an answer, since there are a few subtleties associated with WB development which may not be very well reflected in the WB documentation and can be confusing at first. The mechanics of package search / loading in application projects The standard structure of the WB application project usually contains nested ...

16

Even though documentation indices built with Mathematica 8 or older are not compatible with Mathematica 9, indices built with 9 are compatible with 8 or older. And even though Mathematica 9 can choke up converting documentation notebooks, it has no problems generating documentation indices. So the workaround to points 1 and 4 in the question above is to ...

15

I know that you are thinking ahead and considering how to make the work flow easiest for yourself. Nevertheless, in reading over your question I suspect you are pointed in the wrong direction and will only make things more difficult and burdensome for yourself. What you are talking about is writing Mathematica Applications. (I would start with a single ...

12

You can enter arbitrary expressions in the Expressions debugging view: The function VariableValue must be used in such expressions in order to access any active variables. If the Expressions view is not visible, you can open it from the Workbench main menu using Window / Show View... / Expressions.

11

There are indeed some open source alternatives, as other posters have suggested, but you will miss the unique facilities of WB to develop state of the art documentation. So if you want to develop some serious work in MMA, for yourself or others, you should seriously consider WB. Having said that, I use WB in a (probably) unconventional way. Within WB you can ...

11

The is also a TextMate bundle for Mathematica: https://github.com/dehowell/mathematica-tmbundle TextMate is for Mac only, but this bundle should work in other editors like Sublime Text (multi platform), e-Text Editor (windows)

10

The default directory is $UserAddOnsDirectory/Applications and in MacOSX and Linux you see the target folder every time you click on Deploy Application. 10 If you can settle for anything other than Workbench's Profile, here is a simplistic profiler function with a fairly low latency: ClearAll[profile]; SetAttributes[profile, HoldAll]; profile[code_] := Block[{$totalTime = 0, t, res, time,exclude}, SetAttributes[{time, exclude}, HoldAll]; exclude[cd_] := (t = AbsoluteTime[];res = cd; ...

9

Thanks to @acl's link, I found the hot key combination: CtrlShift/, which launches the browser and navigates to the Mathematica documentation website.

9

This is a workaround for point 2 and 5 in the question, suppressing the "This notebook was created in a more recent version of Mathematica" dialog warnings and improving the rendering of the MORE INFORMATION button a bit. The idea here is to do an Ant search-and-replace after building the doc notebooks, replacing and removing the bits in the notebooks we ...

8

Update 4: The code in this answer has been incorporated into @jkuczm's WWBCommon package. I encourage everyone creating cross-version documentation in Workbench to use it. This is a workaround for Point 5 in the question, allowing cross-version documentation to be built that fixes the layout and text problems in version 9 (and 10), while still displaying ...

7

When you create an Application project in Wolfram Workbench named for example Test, a Test\Test.m file is created that is loaded everytime you save a file in the project, ie. a Get is applied to this file. By default the Execution Build Command in the project's properties will be something like this << Test` This command will look in the file ...

7

This is a workaround for point 3 in the question, making PacletInfo.m files for Mathematica 9 also work on 6. Due to a change in the PacletManager in Mathematica 9, PacletInfo files need an additional line in order for PacletManager to parse them completely. Here's an example: Paclet[ Name -> "xTras", Version -> "1.1.3", ...

7

Here's what I did in Workbench 2 to allow documentation editing and building using Mma 6. It's basically a fix for the version 6 half of Point 4 in the question. We need to work with files in the DocumentationTools folder -- in my installation the folder is located at ...

7

After some tinkering, I found an acceptable solution. The first step is to simply structure the application project in Workbench such that the top package mainPackage is not there, and merge all the sub-packages into myPackage. After building the package and documentation, which then more or less works out of the box, I can then place the package inside the ...

7

While some have pointed out that many of your questions apply to all programming environments. I do think Mathematica's immediacy provides some interesting ways to approach development projects at every scale. Some ideas follow. Wolfram Workbench -- If memory serves, Wolfram Workbench sits on top of Eclipse. Version control -- CVS provides a useful open ...

7

This may seem unsophisticated, but I have developed a few tools and practices that help me keep my fairly large notebooks manageable and help me keep track of what I've done with projects that sometimes go on for months. Specifically, I use: 1. A style sheet with several levels of headings to identify notebook sections. 2. Group openers to make it easy to ...

7

I'll try to answer this as objectively as possible, but note that this answer is shaped by my experiences, so there is a certain subjective flavour to it. Before you try to figure out a workflow for a non-interactive IDE for Mathematica such as the WorkBench/vim/IntelliJ/Eclipse (henceforth, IDE) and the Mathematica notebook (NB), you should evaluate and ...

6

This problem exists because WB encourages you to edit the .m file directly. If you created and edited an .nb (package) file -which automatically creates and updates a .m file - this problem (and others) would not exist. Indeed, if you work with the .nb (package) file you have all the cell organizational/styling facilities available. So when I recently ...

6

One way would be to both Get[] the file and get the file-date when loading it, then dynamically checking the date to see if the file was updated. So just for readability I define a function to get the date, and a function which will update an expression when the file date changes. fileDate[filePath_] := Date/.(FileInformation@filePath) ...

6

One way that works already is to put a break point inside an If statement. If[condition, dummyInstruction; ]; And put a breakpoint at dummyInstruction. I don't know if something like this could be done without modifying the code in break point properties like in some other environments.

6

This is a solution to the problem that seems well-suited to our workflow, which draws on Albert Retey's answer and the answers to @István Zachar's question, but I may decide I hate it after I become more familiar with it. Its main drawbacks are that it requires a separate notebook file that you keep alongside the package file and (potentially) introduces ...

6

It is possible, but first, I am not sure if what I describe below is the only way (or even the simplest one), and second, the procedure described below might lead to an inconsistent index, so use it only for a quick test. This will also require some ( very basic) familiarity with Apache Ant. The documentation build is performed by running Apache Ant (from ...

6

This is my personal opinion, taking into consideration that you need an easy to learn solution and that you are working with documentation notebooks and not plain code (.m files), so it's more difficult to effectively diff them. Using version control may be beneficial for your project. The main reason is that it will make it easy to keep track of who ...

6

Another approach that might suit you (although you've probably settled on one by now) is to use Workbench's built-in Documentation Tools to create documentation for each symbol, and then automatically export formatted usage messages from these documentation notebooks to a .m file. The Documentation Tools provide a way to export the usage messages via the ...

5

Ant property files I would use the Ant property files instead. Getting some Mathematica-related variables by calling Mathematica from Ant is possible (see the second part of this answer), but more complicated and error-prone too. Ant property files are exactly the mechanism used by Ant to separate the parameters that vary from machine to machine, from ...

5

One possibility would be to define those formatted strings in their box form in the package files. It should be pretty straightforward to create boxes from your formatted expressions with ToBoxes and I think that result shouldn't suffer from the problems during copy and paste that you described. You could then use something like that for the definitions of ...

Only top voted, non community-wiki answers of a minimum length are eligible