I'd like to make my form docked where it usually is when my application is executed.
I see only one way of doing that:
-Call OnDockDrop in the container where I usually drop it
But how to setup OnDockDrop's parameters?
You can use the ManualDock method.
yourForm.ManualDock(yourPanel, nil, alNone);
Related
I would like to change the way the Generator is called in my project. As default it is called when the model is safed, but I would need it to be called when enter is hit for example. Can anyone explane where and how to do this?
Thank you very much!
by default generator is called by the build. if you want to call it manually you need to do that yourself. you may use https://dietrich-it.de/xtext/2011/10/15/xtext-calling-the-generator-from-a-context-menu/ as a starting point
I am trying to integrate the plugin, bUnwarpJ into an ImageJ macro I have been writing. The aim is to call this plugin, allow the user to define the parameters and run it.
This plugin has an option to save the user defined parameters, i.e., "save landmarks". I would like this to be executed as well by calling: call("bunwarpj.bUnwarpJ_.saveLandmarks", output folder) from within my plugin.
Currently, the code is:
run("bUnwarpJ");
call("bunwarpj.bUnwarpJ_.saveLandmarks", output folder);
The problem is once bUnwarpJ is completed, you cannot call 'save landmarks' method, and will lose the user input data as well. How would you solve this?
One idea was to have a pop up window (before the run command) which will NOT pause the user interaction, and when the user completes defining landmarks, they can then click OK on this window which executes call(), thereby saving the landmarks while bUnwarpJ is running. The problem I had was most of popup windows will pause the rest of the code..It would ideally be like:
#command for popup window here
run("bUnwarpJ"); #when user is finished, they click Ok on the box above
#which executes: call("bunwarpj.bUnwarpJ_.saveLandmarks", output folder);
Any help is appreciated. Thanks!
Is the user defining landmarks by creating an ROI or something else that might require them to actually interact with an image? If not, and/or those landmark values can be generated ahead of time (using a single image as a template for your batch), you might consider just adding a user interface/dialog box that requests the landmark values and then saves them as a set of variables, or an array. Let me know if that sounds like it might be on the right track and I can do my best to help you set that up.
Using the initial dialog box would definitely be the simplest method to get the input parameters. If for some reason this doesn't work, you might consider putting in a line like:
run("bUnwarpJ");
waitForUser("Input Your Parameters");
I haven't used UnwarpJ, but the waitForUser command should allow the macro to pause for the manual input if the user is meant to do steps other than just parameter inputs. Otherwise, ejkiely's suggestion will be the fastest solution.
I'd like to set a global variable such as SHOW_VIEW_FILES that when set to true, will output __FILE__ at the top of the view file (basically so we can see which files are used quickly rather than tracing code)? Was thinking that probably there is a string that gets appended to for view output and could just add it to the top there.
Or automatically inject a call to a method at the top of each view file? Is something like this already in existence - I think it should be like a one-liner.
Any ideas on how to get this done? Even better would be a way to suppress the normal output and output a tree structure (obviously more than a one-liner).
thx in advance
Can I trigger a code completion menu in a Sublime Text 2 snippet? I want a tab stop to display a completion menu with options instead of just highlighting the text.
For example, tabbing once in this snippet will highlight _link. Instead of just highlighting _link, it is possible to display a completion menu with other options like _selector, _content, and make a choice?
<snippet>
<content><![CDATA[it \{ should${1:_not} have${2:_link} \}]]></content>
<tabTrigger>it</tabTrigger>
<scope>source.ruby</scope>
<description>it { should_? have_? }</description>
</snippet>
Well, what you want is not really possible. However, you could set up a macro that would (1)insert a snippet and (2) activate autocomplete, but I don't think that's really what you want since you can't have custom options that way. You could also consider doing what the ZenCoding plugin does. The plugin will have a tabstop that like this: ${1:option1/option2/option3}. This will at least have the options displayed but they won't really allow for easy selecting and can get really busy fast. You're other option is just to have snippets for your common options and setting the scopes accordingly. For example, where it says <scope>...</scope>, you can specify a specify position where the snippet will apply instead of the just the default source.language. For more about scopes, I suggest you consult the docs here. Using this method might be the easiest and best way. That way in your snippet you could just trigger the autocomplete and the options will include your snippets. A few other options to look into could be creating a .sublime-completions file with a custom scope, or making something similar to Packages/HTML/html_completions.py.
I need to make a field with 2 columns in it. Instead of overriding the layout() and draw() methods, I'm looking for something easier, something like using HorizontalFieldManager. Is that possible?
You can use Blackberry Advanced UI Toolkit containers
com.blackberry.toolkit.ui.container.TwoColumnField
com.blackberry.toolkit.ui.container.TwoColumnFieldManager
Use GridFieldManager for that. See the Java Development Guide "Create a grid layout"