Using "Get all latest" function of Enterprise-Architect outside of the EA - enterprise-architect

Is there a way to acces the EA function "Get All Latest" for a package of the EAP file outside of a running Enterprise architect.
For example via a batch file?

All methods in the Object Model API are available to any COM client, so yes. I usually write my code in C#, but you can get it to work in a script as well if you prefer.
EA.Repository, the basic EA interaction class, has a ShowWindow() method which you can use to control whether or not the main window is displayed.
Version control functions are available through the EA.Package.VersionControl*() methods.

Related

How to send XQuery Code to eval at one particular MarkLogic App server that configured to use local file as its Module DB?

MarkLogic Visual Studio Code Extension provides a way to dynamically send the Xquery code to different MarkLogic enviroments by changing mlxps:setting in its header comment block.
However, it does not work if the Xquery will need to refer to other Xquery library files stored on the local drive, as there is no option to set which ML Http server that the Xquery should be evaluated at.
In contrast, if we need to run the same Xquery from QConsole,
Here is the screenshot if I try send it to port 8300 which is the used for that http server form visual studio code.
Any solution for that? Does it mean this mlxprs could only work for Module in Module DB?
(This is the same problem for sending Xquery form ml-gradle, as one could not specify which App server the XQuery will be sent to.)
I think there may be an issue that in order to eval code against the appserver, it needs to use the /v1/eval endpoint, and that appserver needs to be configured as a REST-API server.
However, configuring the modules database to use the filesystem is not supported for REST API appservers.
The path of least resistance would be to use a modules database and deploy your modules, rather than trying to use the filesystem, but it is an inconvenient limitation.

How to make completion works at first time in PhpStorm 2016.2

I'm using PhpStorm 2016.2 and my code completion does not seem to work properly. When typing $this->assertCo
it suggest only function names that are up to third level ancestors of my class. But when I use Ctrl+Space it suggest correct items.
This is my class diagram:
and missing suggestions are in PHPUnit_Framework_Assert class.
How can I make it work without using Ctrl+Space every time?
PhpStorm and OpenJDK info:
PhpStorm 2016.2
Build #PS-162.1121.38, built on July 12, 2016
JRE: 1.8.0_76-release-b216 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Reason for current behaviour: it was asked by users (WI-9403) to hide static methods when completing methods using this->.
PHPUnit apparently has all assertXXX methods done as static although recommends accessing them via $this-> (same way how it's done in JUnit -- the original tool where PHPUnit devs took inspiration from).
How can I make it work without using Ctrl+Space every time?
Right at the moment -- no way.
But in 2016.2.1 it will work as before for PHPUnit methods/inside PHPUnit test files (WI-32530 -- already implemented).
You may also consider voting for https://youtrack.jetbrains.com/issue/WI-32713 -- to have such behaviour completely optional (additional setting) even outside of PHPUnit tests.

How to debug soap UI scripts using Eclipse

I have written some libraries which is in groovy.
My SOAP UI scripts which is currently used for API automation is using these libraries. As there is no debug option in SOAP UI Pro It is very hard to find the failures. Can someone help to debug the groovy script from eclipse. Which is called internally by a SOAP UI Script
Here is the way I get it done:
Instead of writing the logic in a groovy script using soapUI script editor, create groovy/java (user choice) class and its methods for the same logic. Here I assume that the script would have relative lots of lines code than fewer lines.
This has couple of advantages:
Intelli sense (which is not available if you write the same in soapUI tool)
Formatting of code
Easy debug
Maintenance of the code would be simple
Have a groovy/java project in the IDE of your choice (Intellij suits better for groovy projects, personal view only). Have the logic in the form of classes / methods. Compile those classes and create a jar file. Place it under SOAPUI_HOME/bin/ext directory.
Edit the soapui invoking script(SOAPUI_HOME/bin/soapui.sh on unix or .bat on windows) and add the debug parameters in JAVA_OPTS say
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=6006.
In the groovy script, just instantiate the above created class and call the appropriate method. Use arguments to your methods, that are available in groovy script context, log, testRunner etc variables. Even the script is done with fewer lines.
Debugging In Action:
In your IDE, configure remote debugging and add your debug points where it is needed. And start debug.
Now, just run the groovy script. Go to IDE, it should stop at the point where you added the debug point. You should be to do run through it normally like how you do with java projects in your IDE.
This works best for me.
EDIT:
Of course, this requires programming knowledge, know working in IDE (assuming that user knows as per the question) configuring build/class path etc.
Can't be done. SmartBear has been talking about this since at least 2007 (when SoapUI was still owned by Eviware), but still has not delivered. Here is one source: http://community.smartbear.com/t5/SoapUI-NG/Debugging-Groovy-scripts/td-p/33995

The Web server is configured to not list the contents of this directory

Using Visual Studio 2012:
I created an "ASP.NET Empty Web Application" (using C#).
I used NuGet to install the FubuMVC package.
When I run the application (using IIS Express), I get the "Welcome to FubuMVC!" page which tells me to delete the FubuMVC.GettingStarted.dll file and to set the home page.
So I do both of those things, implementing a HomeController that simply returns "Hello World" from Index.
Rather than the expected "Hello World", I get an IIS error: The Web server is configured to not list the contents of this directory.
What have I done wrong?
try this
cmd => don't forget to run as administrator
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
Just tried reproducing your problem with a brand new project; it turns out that problem is that the instructions in the example haven't kept up with the changes in FubuMVC.
The instructions tell you to create a class called 'MyHomeController' and add the Index() method to it. This used to work, because one of the default rules for routes was to use any class with a name that ends in 'Controller'.
But the default has been changed in more recent versions, and the rule now looks for classes ending in 'EndPoint'.
So if you change the name of the class from 'MyHomeController' to 'MyHomeEndpoint', it should work.
Also, remember that the application pool needs to restart for the new configuration to take effect, so you might have to touch your web.config (or force IISExpress to restart).
Did you activate FubuMVC in your Global.asax? I usually see that error when there is no FubuMVC application.
So in Application_Start() (or whatever it's really called), you'll need something like:
FubuApplication.DefaultPolicies().StructureMap(new Container()).Bootstrap();
Where you're telling it:
1.) What are the policies/conventions to use
2.) What's your IoC container
Usually if I run into this it's because I've got a conflict with a route and a folder in the project. For example, I might have a folder called 'Unit' and inside it I have a class called 'UnitEndpoint' with a method 'get_unit' (which should map to '/unit' as a route, assuming I'm using the FubuMVC defaults).
In that case, browsing to '/unit' will result in this error because IIS thinks I'm trying to list the contents of the 'Unit' folder. Renaming the endpoint or the folder to remove the conflict will fix it (e.g., renaming the 'Unit' folder to 'Units').
I suggest that you recompile your application or at least touch your global.asax -- looks like you need to rerun the App_Start method.

What is the best way to integrate an external build tool into Eclipse?

I've just started using Eclipse for Python development since we can make use of a lovely plugin I've found to enable distributed pair-programming. Anyway, the next step to getting Eclipse to integrate properly with our existing environment, would be finding a way to drive our current build tool (Waf) from within the IDE.
So the question is, is there a way I can set up Eclipse to drive Waf in a Make-like fashion? I see for Make it has some quite advanced functionality, such as being able to work out what targets are available etc. Bonus points for telling me if there is a way I could go as far as this! (I suspect the answer is that this is all built in to the Make plugin for Ecplipse).
In eclipse CDT I run waf by simply changing the build program in
ProjectPreferences->C/C++ Build->BuilderSettings
Choose External builder and then put in the path to waf
for example I use
/Users/mark/bin/waf -v -k -j2
Note that waf and make do not agree on the -j setting and you have to give i explicitly and not use the eclipse dialog.
You can use the Make targets view add the targets to call waf e.g. configure, build etc.
One issue I had is that Eclipse is hard coded to see the output from Make say Make when i changes directory so I had to patch waf
see waf issue
You could try and define a Custom builder, calling Waf with the appropriate options for the python compilation step.
(From eclipsejdt alcatel-lucent manual)
That picture (not related to Waf at all) illustrates the fact a builder can be defined as an external tool (meaning any .bat or shell you may want to call)
In that "eclipsejdt" example, the custom builder was configured like so:
To set up the builder, bring up the property dialog for project "jex1p" by selecting the project in the Package Explorer and selecting Project > Properties > Builders. Then click New..., select Program, and click OK.
Configure the builder Main tab using values:
Name : nmbldr_pre
Location : ${system_path:ksh}
Working Directory: ${build_project}
Arguments : nmbldr -p 2 -t ${build_type} -s jpre
As VonC says, the elegant way is to use a Custom builder.
Alternatively it is less work (in the short term) to hack together an ant script to do the heavy lifting and define an external builder to configure it onto the project. You may find the drawbacks of an external builder (e.g. no incremental support) mean it is worth investing the effort to do it "properly".