Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Create plugin programmatically
Create plugin programmatically [message #326213] Tue, 11 March 2008 20:00 Go to next message
Eclipse UserFriend
Originally posted by: andia.maleki.gmail.com

Hi all,

i try to create a Plugin-in project in java programmatically, i dont know
how to create the manifest.mf and set the dependencies.
i founded this code to add the dependencies, but i dont know how to set
referencedProject. can someone help me?

Thanks

public static void addReferenceToProject(IProject
referencedProject,IProject project, IProgressMonitor monitor)
throws CoreException{
IProjectDescription description = project.getDescription();
IProject[] referencedProjects = description.getReferencedProjects();
IProject[] newReferencedProjects = new
IProject[referencedProjects.length + 1];
System.arraycopy(referencedProjects, 0, newReferencedProjects, 0,
referencedProjects.length);
newReferencedProjects[referencedProjects.length] = referencedProject;
description.setReferencedProjects(newReferencedProjects);
project.setDescription(description, monitor);
}
Re: Create plugin programmatically [message #326228 is a reply to message #326213] Wed, 12 March 2008 12:33 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Andia,

Please don't ask the same question separately on more than one newsgroup
as you've done with posting this one to the newcomer newsgroup as well.


Andia wrote:
> Hi all,
>
> i try to create a Plugin-in project in java programmatically, i dont
> know how to create the manifest.mf and set the dependencies.
> i founded this code to add the dependencies, but i dont know how to
> set referencedProject. can someone help me?
>
> Thanks
>
> public static void addReferenceToProject(IProject
> referencedProject,IProject project, IProgressMonitor monitor)
> throws CoreException{
> IProjectDescription description = project.getDescription();
> IProject[] referencedProjects =
> description.getReferencedProjects(); IProject[]
> newReferencedProjects = new IProject[referencedProjects.length + 1];
> System.arraycopy(referencedProjects, 0, newReferencedProjects, 0,
> referencedProjects.length);
> newReferencedProjects[referencedProjects.length] = referencedProject;
> description.setReferencedProjects(newReferencedProjects);
> project.setDescription(description, monitor);
> }
>
Previous Topic:How to contribute a dynamic menu
Next Topic:Re: Retarget or override Open, Save, Delete actions
Goto Forum:
  


Current Time: Thu Aug 15 01:59:50 GMT 2024

Powered by FUDForum. Page generated in 0.03742 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top