Default propath/assemblies of project in OEA

Posted by DenDuze on 22-May-2017 03:04

Hi,

Is there some way to define the entries of the propath thta will be used when creating a new Progress Project in Eclipse.
I always want the same propath for all my projects.

I know if I should work with the Shared AVM that is possible by Window - Preferences - Progress OpenEdge - Shared AVM - Propath but how can I do that is I do not use the SharedAVM?

Is there some file that is used for the default propath for a new project of can I subscribe to some event when a project is created?


EXTRA Q: when I create a new project I also reference a assemblies.xml from another project, that is done in the properties of the projevy - Progress OpenEdge - Assemblies
is there some way to automize that on creation of a new project?

Thanks
Didier

All Replies

Posted by Sanjeva Manchala on 22-May-2017 04:29

Hello Didier,
 
You can do this by creating a Custom project from “Customization Editor” (OpenEdge > Tools > Customization Editor). All you have to do is, create a Custom project from PDS OE and then use that project when creating a new project. Here are the steps to create a Custom project in PDS OE:

1.       Go to OpenEdge > Tools > Customization Editor

2.       Select “OpenEdge Custom Projects” from left side view and then click New

3.       Provide a name for Custom Project and then provide values for “Perspective, Required Facet, OpenEdge runtime”

4.       Select Folder layout under Custom Project from left side section and then add required folders and then PROPATH

5.       Save the changes and then restart PDS OE

6.       Now launch New OpenEdge project wizard from File menu (File > New > OpenEdge Project)

7.       Provide Project name and then select “General” tab and then select “Custom” radio button

8.       Expand the drop down and select <CustomProject> and then click on Finish

9.       Observe that project is created with customized folder structure and PROPATH.

 
 
 
 
 
 
Hope this helps,
Sanjeev
 

Posted by DenDuze on 22-May-2017 06:54

Hi Sanjeev,

Thanks, this works BUT I only can add the folders that I've put in the Folder Layout to the propath.

I have a few 'external directories' that I also want to add to the propath (for every project I create)

Isn't there some way to add some other entries to the Propath of this Custom Project?

Regards

Didier

Posted by Sanjeva Manchala on 22-May-2017 07:26

Hello Didier,
 
Unfortunately this support is not available at present. I think this is a valid Enhancement to Customization editor, please submit an enhancement request for this. Also you can add an Idea in the “Ideas” section in communities.
 
Hope this helps,
Sanjeev
 

Posted by DenDuze on 22-May-2017 07:45

Ok, Thanks Sanjeev.

Damn, now I'm still stuck with this...

But still, for some part I'm helped with this

Posted by Sanjeva Manchala on 22-May-2017 08:08

Hello Didier,
 
In the meantime, as a workaround you can do the following to achieve what you want:

1.       Create an OpenEdge project and then add the necessary PROPATH entries manually from Project Properties

2.       Go to the project location from disk and then take a copy of “.propath” file (<workspace>/<project>/)

3.       Create another project and then replace .propath file with the copy of above project (from step2)

4.       Refresh the newly created project

 
May be you can write a script to do this job automatically when a new project is created.
 
Hope this helps,
Sanjeev
 

Posted by DenDuze on 22-May-2017 08:20

Info for the people that have the same problem:

It looks like you can force this by manually add the wanted directories to the 'C:\Progress\oe11.6\oeide\eclipse\plugins\com.openedge.pdt.extensibility.user_1.0.0\plugin.xml'.

I guess it's not the correct way to do it but it works (for now)

Posted by DenDuze on 22-May-2017 08:43

Hi Sanjeev,

Yes, that was the way I did it before but after a few new projects I was searching for a cleaner solution ans therefore I created this post.

What I find interesting is your "write a script to do this job automatically when a new project is created."

How can I do that? This is interesting for a few things so ...

Posted by Sanjeva Manchala on 23-May-2017 02:32

Hello Didier,
 
With some googling I’m able to create a PowerShell script which monitors a workspace and then copies “.propath” file into new Project each time. Below is the script:
 
### SET FOLDER TO WATCH + FILES TO WATCH + SUBFOLDERS YES/NO
                $watcher = New-Object System.IO.FileSystemWatcher
    $watcher.Path = "C:\workspaces\117\Random2" #workspace location to monitor
    $watcher.Filter = "*.*"
    $watcher.IncludeSubdirectories = $false
    $watcher.EnableRaisingEvents = $true 
 
### DEFINE ACTIONS AFTER AN EVENT IS DETECTED
    $action = { $path = $Event.SourceEventArgs.FullPath
                                                                $source = "C:\workspaces\117\Random2\.propath" #location of .propath file that needs to copied to other projects
                                                                $logline = "$(Get-Date), $source, $path"
                                                                Add-content "C:\log.txt" -value $logline
                                                                Copy-Item -Path $source -Destination $path
                                                } 
### DECIDE WHICH EVENTS SHOULD BE WATCHED
    Register-ObjectEvent $watcher "Created" -Action $action
    while ($true) {sleep 5}
 
Hope this helps,
Sanjeev
 

Posted by DenDuze on 23-May-2017 03:17

HI Sanjeev,

Thanks for this but I expected that there was some trigger/event included in eclipse that would fire when a new project was created.

Thanks for this.

Regards

Didier

This thread is closed