facebook

Creating MyEclipse projects progammatically

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #299828 Reply

    bick
    Member

    I am working on a plugin and I’d like the plugin to create MyEclipse projects programmatically. With general Eclipse, I’d create a Java project using:

    ...
    IProject eclipseProject = ...
    ...
    eclipseProject.create(...);
    ...
    IJavaProject javaProject = org.eclipse.jdt.core.JavaCore.create(eclipseProject);

    Say I want to create a MyEclipse Web Project, or a MyEclipse Enterprise project. Is there a MyEclipse specific mechanism to do that? I assume that there is since there are MyEclipse-specific project files like:

    .mymetadata

    and a .myeclipse directory.

    Thanks

    #299863 Reply

    Loyal Water
    Member

    MyEclipse has not exposed any public API to do this. Im afraid there is official way of doing this.

    #299870 Reply

    bick
    Member

    @support-nipun wrote:

    MyEclipse has not exposed any public API to do this. Im afraid there is official way of doing this.

    Is this something that is going to be addressed in the future?

    Would you recommend that organizations not to try and “fudge” projects so that they are MyEclipse compatible?

    Thanks Nipun

    #299905 Reply

    Scott Anderson
    Participant

    bick,

    While there aren’t any APIs you can use to directly construct MyEclipse projects, they are basically Eclipse projects with a specific structure and some meta-data. I believe if you create an example project, using our wizards, of each project you’re interested in you can see how you could pretty easily create projects that look effectively the same in all aspects by using the standard Eclipse project creation mechanisms and then some metadata files using XML generation/substitution.

    #299922 Reply

    bick
    Member

    @support-scott wrote:

    bick,

    While there aren’t any APIs you can use to directly construct MyEclipse projects, they are basically Eclipse projects with a specific structure and some meta-data. I believe if you create an example project, using our wizards, of each project you’re interested in you can see how you could pretty easily create projects that look effectively the same in all aspects by using the standard Eclipse project creation mechanisms and then some metadata files using XML generation/substitution.

    I have created a MyEclipse Web project by hand however the .myeclipse\build directory is not created. Also, when I deploy the Web app to WebSphere, the installWebModule.jacl script is never executed so it looks to WebSphere that the application is not deployed. It does explode the EAR to the WebSphere deployment area which is good… but I’m not sure why it does not invoke installWebModule.jacl.

    Do you know why deploying/redeploying a WebSphere application would not invoke the that JACL script?

    One of the biggest issues I have is that there is very little logging in MEB, so it is nearly impossible to figure out why it is not running the JACL script.

    Any help would be much appreciated.

    Thanks.

    #299940 Reply

    Riyad Kalla
    Member

    bick,

    Following Scott’s suggestion of looking through our .project and .classpath contributions will give you a good idea of the contents in that file, .mymetadata is really straight forward, the .myeclipse directory has some configuration information from time to time if you are using a feature that requires storage of more specific metadata (like project enhancement of RAD projects).

    Given all that you should be fine “fudging” those project types by assembling them yourself — atleast for a basic web project it’s really straight forward what MyEclipse wants in it’s dot files. For addition capabilities like struts and hibernate, be sure to check the .project contributions and any addition dot-files we might create.

    As for the JACL script, it’s only executed when Blue deploys a project to WebSphere via one of the MyEclipse Blue WebSphere connectors — if you are using different connectors or a custom location deployment, JACL won’t get run.

    I don’t know if that helps?

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Creating MyEclipse projects progammatically

You must be logged in to post in the forum log in