Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Create Folder in Project with Wizard
Create Folder in Project with Wizard [message #18118] Sun, 18 November 2007 10:01 Go to next message
Eclipse UserFriend
Originally posted by: special1.gmx.de

Hello,

I'm trying to implement a Script Language with dltk in Eclipse.
It is a Text-Mining language and the aim is, that you can create so called
rule Files in a source folder in your project and add some text files in a
folder called input and look at the results after running in a folder
called output in in the same project, too.

My problem is, that I'm at this time not able to create and use some
folders on startup in my eclipse project automatically.

I'm using the ProjectWizard with ProjectWizardFirstPage and
ProjectWizardSecondPage.

public class ProjectWizard extends NewElementWizard implements INewWizard,
IExecutableExtension
{

..

}

I want that, if you create a new project from my plugin, you automatically
create three folders in the project.

Can anyone please help me ?

Thanks
Sebastian Biedermann
Re: Create Folder in Project with Wizard [message #18191 is a reply to message #18118] Tue, 20 November 2007 08:27 Go to previous messageGo to next message
Andrei Sobolev is currently offline Andrei SobolevFriend
Messages: 72
Registered: July 2009
Member
Hi Sebastian,


You could create any project structure in overloaded method
ProjectWizardSecondPage.performFinish().

For example then you create pages from ProjectWizard class.
....

fSecondPage = new ProjectWizardSecondPage(fFirstPage) {
public void performFinish(IProgressMonitor monitor) throws
CoreException, InterruptedException {
if (fCurrProject == null) {
updateProject(new SubProgressMonitor(monitor, 1));
}
// then do what you want with fCurrProject

// At the end we need to perform other configuration steps.
super.performFinish(monitor);
}
};
addPage(fSecondPage);
......

Best regards,
Andrei.

> Hello,
>
> I'm trying to implement a Script Language with dltk in Eclipse.
> It is a Text-Mining language and the aim is, that you can create so
> called rule Files in a source folder in your project and add some text
> files in a folder called input and look at the results after running in
> a folder called output in in the same project, too.
>
> My problem is, that I'm at this time not able to create and use some
> folders on startup in my eclipse project automatically.
>
> I'm using the ProjectWizard with ProjectWizardFirstPage and
> ProjectWizardSecondPage.
>
> public class ProjectWizard extends NewElementWizard implements
> INewWizard, IExecutableExtension
> {
>
> .
>
> }
>
> I want that, if you create a new project from my plugin, you
> automatically create three folders in the project.
>
> Can anyone please help me ?
>
> Thanks
> Sebastian Biedermann
>
Re: Create Folder in Project with Wizard [message #18259 is a reply to message #18191] Wed, 21 November 2007 12:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: special1.gmx.de

Hi

thanks for help, i now created some folders in my project with IFolder
interface in the finish method
just like this


fCurrProject = fFirstPage.getProjectHandle();
input = fCurrProject.getFolder("input");
input.create(false, true, monitor);


there are now some normal folders on startup,
can you tell me how i can create a source folder, too ?

Thanks a lot
Sebastian

"Andrei Sobolev" <haiodo@xored.com> schrieb im Newsbeitrag
news:fhu5l9$otl$1@build.eclipse.org...
> Hi Sebastian,
>
>
> You could create any project structure in overloaded method
> ProjectWizardSecondPage.performFinish().
>
> For example then you create pages from ProjectWizard class.
> ...
>
> fSecondPage = new ProjectWizardSecondPage(fFirstPage) {
> public void performFinish(IProgressMonitor monitor) throws
> CoreException, InterruptedException {
> if (fCurrProject == null) {
> updateProject(new SubProgressMonitor(monitor, 1));
> }
> // then do what you want with fCurrProject
>
> // At the end we need to perform other configuration steps.
> super.performFinish(monitor);
> }
> };
> addPage(fSecondPage);
> .....
>
> Best regards,
> Andrei.
>
>> Hello,
>>
>> I'm trying to implement a Script Language with dltk in Eclipse.
>> It is a Text-Mining language and the aim is, that you can create so
>> called rule Files in a source folder in your project and add some text
>> files in a folder called input and look at the results after running in
>> a folder called output in in the same project, too.
>>
>> My problem is, that I'm at this time not able to create and use some
>> folders on startup in my eclipse project automatically.
>>
>> I'm using the ProjectWizard with ProjectWizardFirstPage and
>> ProjectWizardSecondPage.
>>
>> public class ProjectWizard extends NewElementWizard implements
>> INewWizard, IExecutableExtension
>> {
>>
>> .
>>
>> }
>>
>> I want that, if you create a new project from my plugin, you
>> automatically create three folders in the project.
>>
>> Can anyone please help me ?
>>
>> Thanks
>> Sebastian Biedermann
>>
Re: Create Folder in Project with Wizard [message #18292 is a reply to message #18259] Wed, 28 November 2007 07:15 Go to previous message
Andrei Sobolev is currently offline Andrei SobolevFriend
Messages: 72
Registered: July 2009
Member
Hi Sebastian,
>
> Hi
>
> thanks for help, i now created some folders in my project with IFolder
> interface in the finish method
> just like this
>
>
> fCurrProject = fFirstPage.getProjectHandle();
> input = fCurrProject.getFolder("input");
> input.create(false, true, monitor);
>
>
> there are now some normal folders on startup,
> can you tell me how i can create a source folder, too ?

You could do it after super.performFinish(monitor) will be executed, it
configures all required DLTK things.

Example:
>>>>>
IScriptProject scriptProject = this.getScriptProject();
IBuildpathEntry[] rawBuildpath = scriptProject.getRawBuildpath();
IBuildpathEntry[] newBuildpath = new IBuildpathEntry[rawBuildpath.length
+ 1];
System.arraycopy(rawBuildpath, 0, newBuildpath, 0, rawBuildpath.length);
newBuildpath[rawBuildpath.length] = DLTKCore.newSourceEntry("myfolder");
scriptProject.setRawBuildpath(newBuildpath, new NullProgressMonitor());
>>>>

You also could create external source entries, library entries, project
dependency entries, container entries. (DKTKCore methods:
newExtLibraryEntry, newLibraryEntry, newLibraryEntry, newContainerEntry).

Best regards,
Andrei.

>
> Thanks a lot
> Sebastian
>
> "Andrei Sobolev" <haiodo@xored.com> schrieb im Newsbeitrag
> news:fhu5l9$otl$1@build.eclipse.org...
>> Hi Sebastian,
>>
>>
>> You could create any project structure in overloaded method
>> ProjectWizardSecondPage.performFinish().
>>
>> For example then you create pages from ProjectWizard class.
>> ...
>>
>> fSecondPage = new ProjectWizardSecondPage(fFirstPage) {
>> public void performFinish(IProgressMonitor monitor) throws
>> CoreException, InterruptedException {
>> if (fCurrProject == null) {
>> updateProject(new SubProgressMonitor(monitor, 1));
>> }
>> // then do what you want with fCurrProject
>>
>> // At the end we need to perform other configuration steps.
>> super.performFinish(monitor);
>> }
>> };
>> addPage(fSecondPage);
>> .....
>>
>> Best regards,
>> Andrei.
>>
>>> Hello,
>>>
>>> I'm trying to implement a Script Language with dltk in Eclipse.
>>> It is a Text-Mining language and the aim is, that you can create so
>>> called rule Files in a source folder in your project and add some text
>>> files in a folder called input and look at the results after running in
>>> a folder called output in in the same project, too.
>>>
>>> My problem is, that I'm at this time not able to create and use some
>>> folders on startup in my eclipse project automatically.
>>>
>>> I'm using the ProjectWizard with ProjectWizardFirstPage and
>>> ProjectWizardSecondPage.
>>>
>>> public class ProjectWizard extends NewElementWizard implements
>>> INewWizard, IExecutableExtension
>>> {
>>>
>>> .
>>>
>>> }
>>>
>>> I want that, if you create a new project from my plugin, you
>>> automatically create three folders in the project.
>>>
>>> Can anyone please help me ?
>>>
>>> Thanks
>>> Sebastian Biedermann
>>>
>
Previous Topic:problem xotcl
Next Topic:Hover Information
Goto Forum:
  


Current Time: Thu Apr 25 15:35:00 GMT 2024

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

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

Back to the top