How to I call the "Read value from XML file" action from custom code? - install4j

The title says it all - I need to refactor multiple mini-actions into a single coherent piece of custom code, and to keep the refactoring under control, I want to stick with Install4J Actions as far as possible.
I checked the type hierarchy below com.install4j.api.actions.Action but found nothing XML-related.
BTW eventually the installer will have to call the "Replace text in XML files" action as well.
I.e. I'll appreciate any hints for a general strategy to find any action, given the name shown in the "Select an installation Action" dialog or in the "Screens & Actions" section of the Install4J GUI.

The class name of the action can be seen in the .install4j project file. For example, for the "Read value from XML file", the class name is
com.install4j.runtime.beans.actions.xml.XPathReadAction
You can instantiate it in custom code and execute it via
action.install(context);

Related

The test may not have the latest project changes. Try again later

While clicking on the test "The test may not have the latest project changes. Try again later." an error is coming
Go to the "Develop" tab and change the Display Name.
So, while testing you will be saying "Talk to " rather than "Talk to my test app"
Finally, after doing multiple try i am able to resolve it by using following steps.
I found the answers by searching the solution for warning "The test may not have the latest changes.." in action console help.
Pick a display name that is short, unique, and memorable. Your brand or product name is usually a good choice. This name is used as the way users invoke your Action, and it serves as the title of your listing in the Assistant directory.
Caution: If you have multiple Actions projects that use the same display name, the simulator chooses one at random. For consistent testing results, use unique names or release channels for each Action.
Reference Link: https://support.google.com/actions-console/answer/9613473?hl=en
Now how to give display name or change display name.
Go to develop tab and give display name or change display name as follows

MSComctlLib reference/components load with "was not a loaded control class" error

I'm having trouble oppening an project developed in VB6. Some controls attached with MSComctLib class are not loading.
I'm using Windows 7.
In the error analysis the following message appears (without the number of lines):
Class MSComctlLib.ImageList of control ImageList1 was not a loaded control class.
Class MSComctlLib.Toolbar of control Toolbar1 was not a loaded control class.
MSComctlLib.StatusBar class of control sbStatusBar was not a loaded control class.
and then a lot of invalid property names,
Ex:
The property name _ExtentX in ImageList1 is invalid
The property name Buttons in Toolbar1 is invalid
...
According to the guidance of microsoft support site http://support.microsoft.com/kb/896559, an update would be the solution http://www.microsoft.com/en-us/download/details.aspx?id=10019
I tried running the executable VisualBasic6-KB896559-v1-ENU
but I still have the same error when opening the project.
Could someone tell me how to solve it?
Thanks in advance!
If you don't have the common controls selected in your project, but the controls are on a form, then you'll receive these errors when you try to load the project (or add a pre-existing form to a project that doesn't have the component selected).
On the VB6 menu, select Project-Components. Scroll down to Microsoft Windows Common Controls 6.0 (if you have a service pack installed, then the SP level will usually be at the end of the library name). Select that component, click Ok. Save the project, and then reload the project.
If this is the source of your issue, you should now be able to load those forms that have a reference into the common controls.

Show error marker for external resource

I have written an eclipse editor that performs syntax checking and if it finds an error, it will display it in the editor.
Currently I am doing this by creating a marker in the respective IResource and that is working well until the user uses the File -> Open File... option in order to open a non-project file with that editor.
The problem is that the EditorInput is no longer an IFileEditorInput (it's a FileStoreEditorInput) that allowed me to retrieve the connected IResource via getFile() (on which I can add the marker via createMarker()). In fact the core problem is that the opned file isn't an IResource at all (at least that is what I'm guessing as it is not in the eclipse workspace).
Is there another way of showing the error markers in the editor? It doesn't need to be savable or anything... Just a way to tell the editor to create the same markers in the source code as if there were some IMarker attached to the opened IResource.
Okay the thing was that I was actually looking for the creation of an Annotation in the AnnotationModel of the DocumentProvider. There it could be added via addAnnotation.
That approachs works fine. However I haven't found a list of available annotation types (as there are for Markers), so it's a little tricky to actually get the proper annotation...

Plone Workflow: How to check for multiple attributes of an object?

In our project we would like to have a workflow which checks whether all three signatures (implemented through booleans) have been added to an object of type "Project" before it continues to the next state.
Unfortunately this doesn't seem to be possible while editing the workflow through the web and we haven't been able to find it in the documentation either.
How would we do it?
Thank you very much for any assistance.
Use the transition Guard expression to check for this:
python: here.getFirstBoolean() and here.getSecondBoolean() and here.getThirdBoolean()
This can be access through the ZMI:
append /manage onto site root
go to "portal_workflow"
click the "contents" tab
click on the workflow you're using
click the transitions
you should see the area for a guard expression
You could put the login into a Script in the custom folder also if you wanted to make it easier and do it all TTW.

How do you set up new class templates in Eclipse?

I mainly program Android, and one of the things I (and the rest of android programmers I'm sure) use with tenacity is android.util.Log. Every class I create has a
private static final String TAG = "ClassName";
tag that I write up as soon as I create the class, before I work on anything else. So, since I always create the tag I figured it would just save me on time (albeit a small amount) to just have it as part of the template for an empty class. My problem is, I don't know how or where to create code templates. Can anyone inform me on how to manage and create them?
What you're referring to are called "code templates" in Eclipse.
Go to Eclipse Preferences, search for "templates", you'll find them under Java -> Code Style -> Code Templates.