How do you setup project to use ini file in Developer Studio? - eclipse

I use a ini file to setup fonts and colors (instead of the registry). I have linked the ini file like this:
Properties->ProgressOpenEdge->Startup parameters->
"-basekey ini -ininame C:\somepath\ini\progress11.ini"
If I make a small run file (and press run) the ini file is correctly loaded:
run start.w
But if I press run on the start file the ini file is not loaded (getting font errors). How to setup eclipse to load the ini file correct?
Edit: Had to have 2 more reputation to show images.

On the "run" button there's a "downarrow". Click on that, and then click on "run configurations" - that'll enable you to set the startup parameters for the run button.

Related

Run launch file automatically in Eclipse

I would like to have the possibility to run a .launch file without having to navigate to a project and folder and choose that file and right click and choose run.
It would also be nice if I could run tomcat without having to navigate to the server tab as you can see in screenshot
Is there any way I can do this?
.launch files are managed in Eclipse as Run configurations. Normally, .launch files present in an Eclipse project are automatically added to the list of run configurations for the project. These can be accessed through Run | Run Configurations... or using the run menu shortcut
If the launch files are not automatically detected when a project is first imported, running them once should allow Eclipse to detect them.

Running ANT targets using .launch file

In one of my legacy project ant target is invoved from *.launch file. This file contains <launchConfiguration> tag and one of the attribute name "type" is ant class org.eclipse.ant.ANTLaunchConfigurationType, different parameter are set using this tag. When this launch file is executed in eclipse, one of the ANT target is executed specified in launchConfiguration tag.
I am not able to find any information around this functionality of ANT. Only relevant thread found is, which is unanswered
Running eclipse ant targets from an external command
I am not able to understand how launch files are created and how to set parameter to launchConfiguration tag.
The .launch files are created by Eclipse for every Run Configuration you want to be saved:
Open Eclipse.
Select a build.xml file.
Through the context menu, execute Run as/Ant build.... A dialog appears.
If you want to pass parameters to the Ant script, you have to fulfil the Arguments area (in the Main tab) like this:
-Darg1=value1
-Darg2=value2
...
Then, go to the Common Tab and focus on the Share file field: With the Browse button, select your project. This will create the .launch file into your project, and let it available for further executions. (You should rename it).
Execute Run.
You can edit the .launch configuration in menu Run>External tools>External tools configuration.
Note: Within the Run Configuration, you'd better spend some minutes reading all the parameters available in all the tabs. For example, in the Build tab, you can set if you want a project to be build before your script is executed (If not, unchecking the checkbox may save you a lot of time). Or in the Refresh tab, you can select which project directories you want to be refreshed after the script is executed, etc.
Launch configurations for Ant Builds are created and managed using the 'Run > External Tools > External Tools Configurations...' dialog.
You can import existing .launch files using 'File > Import... > Run/Debug > Launch Configurations'

Editing files with netbeans without setting up project

Is there a way to use netbeans as a simple text editor, without setting up a project?
I am interested in using netbeans features as a text editor, especially for making quick changes on remote servers.
Yes, of course you can use it as a text editor. Just Open Netbeans and select File > Open File and select the file to open from the file chooser dialog. Make changes and click Save.
If you want to edit files on network locations, again do File > Open File and paste the location of your remote file.

How to go to specific folder in Eclipse?

From Eclipse, how to go to the specific folder? I mean in windows, how to open a command line which corresponding to the folder or direct open the file explorer to open the corresponding folder?
You have to create an external tool with location ${env_var:SystemRoot}\explorer.exe (or cmd.exe) and arguments /select,${resource_loc} . Any selected file or directory can now be shown in the windows explorer.
Create an External tool
Go into the external tool configuration (you can find it into the corresponding toolbar icon) :
Then you can create your own external tool :
Create a new Program (select Program in the tree)
Name it shell
Set the location to ${env_var:SystemRoot}\explorer.exe
Set the arguments to /select,${resource_loc}
Run the external tool
Once created you can run the external tool from the context menu or from the toolbar ...
I have been using an Eclipse plugin called PathTools for sometime now, and am happy with it.
It adds a number of buttons to the Eclipse toolbar which allow you to :
Directly open a cmd prompt at the selected folder.
Open an Explorer window for the selected folder.
Update site : http://pathtools.googlecode.com/svn/trunk/PathToolsUpdateSite/site.xml
Sample screenshots
Installing the `Path Tools Feature`
I chose to install only the Path Tools Feature
Opening a terminal
Opening a terminal directly at the Folder Path :
(The above snapshot is that for OSX but works in Windows as well)
Opening Explorer
Opening a folder directly in Explorer/Finder :
Great simple plugin for this:
http://basti1302.github.com/startexplorer/
2019 update (no plugins required):
Right click the desired folder in the Project Explorer, go to Show In, choose either Terminal or System Explorer. See below screenshot:
Right click the file (in left pane).. then use Win Goodies -> Open file in Explorer

Application Deployment

I deployed an application using this method and it worked very good. However, there are 2 missing things that I been trying to find but can't:
1) How do I include resource files in the installation? I have a folder with files that have some user data, and those need to be there after the installation so the application can run, this is an oversimplified example I'm working on (I need to include NecessaryFile1.xml, NecessaryFile2.xml and NecessaryFile3.xml and the folder they're in):
alt text http://img193.imageshack.us/img193/7782/resources.png
2) How can I put the application in the start -> programs menu? It doesn't seem to do that either. It just puts it in the C:\Program Files\My Company Name\ApplicationName\ directory.
Thanks for any suggestion!
Go to your Setup project in Visual Studio. In the "File System" tab, locate "Application Folder". Right-click and then click Add | Folder. Name the new folder "Data". Right-click on the new "Data" folder and click Add File, then add the needed XML files. Repeat for as many different folders and/or files as required by your application.
When you compile and run your setup project, the "Data" folder and its contents will be deployed along with the application.
Click on each XML file in the Solution Explorer and then in the Properties window below (see your screenshot) you click and change "Build Action" to "Copy" and "Copy to Output Directory" to "Copy If Newer". That does the trick for me, at least with ClickOnce...