Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Adding new Make Targets programmatically


Hi David:

Thank you for your answer. I'm using a standard make project, I just extended the new Project wizard to ask a few more questions. In case is relevant, I have several stages on my make process which involve calling several make files separately. I'm also using the Make Target to call a "configure" script. I don't know if that's the best way, but at least it works.

About the error, just found out the trace to be like this:

Caused by: java.lang.NoClassDefFoundError: org/eclipse/cdt/make/core/MakeCorePlugin at antsIde.wizards.AntsNewProjectWizard.doFinish(AntsNewProjectWizard.java:322) at antsIde.wizards.AntsNewProjectWizard.access$0(AntsNewProjectWizard.java:159) at antsIde.wizards.AntsNewProjectWizard$1.run(AntsNewProjectWizard.java:136) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)

... which I don't understand because "org.eclipse.cdt.make.core_3.1.1.200609270800.jar" is included as an external JAR in the building path and is used by other parts of my plugin successfully (btw, I migrated to CDT 3.1.1 and Eclipse 3.2 since I wrote the first post)

Any ideas why Eclipse can not find the MakeCorePlugin class ONLY at run time? (no error whatsoever before launching)
Thanks a lot

Tomas


David Inglis wrote:
Few question first;

Are you using your own make builder or is the project a standard make
project?

What is this error you are getting below? You mention something about the
class path to IMakeTargetManager, could you be a bit more specific here, as
this is the interface to create make targets.

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Tomas
Sent: Monday, October 30, 2006 9:19 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Adding new Make Targets programmatically


Hi

So what I have so far, after diving for several hours though the CDT
source code is:

--------------------------------------------------------------------------
--------------

IMakeTargetManager fTargetManager;
fTargetManager = MakeCorePlugin.getDefault().getTargetManager();

String[] id = fTargetManager.getTargetBuilders(getNewProject());
if (id.length == 0) {
   throw new CoreException(new Status(IStatus.ERROR,
MakeUIPlugin.getUniqueIdentifier(), -1,

MakeUIPlugin.getResourceString("MakeTargetDialog.exception.noTargetBuilder
OnProject"),
null)); //$NON-NLS-1$
}
String targetBuildID = id[0];
IMakeTarget target = fTargetManager.createTarget(getNewProject(),
"configure", targetBuildID);
fTargetManager.addTarget(getNewProject().getParent(), target);

--------------------------------------------------------------------------
--------------

Executing that raises an error dialog with a line containing the
IMakeTargetManager class path, which I guess it means there is something
wrong with my use of that class.
And for the IMakeBuilderInfo I have:

--------------------------------------------------------------------------
--------------

IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(getNewProject(),
fTargetManager.getBuilderID(targetBuildID));
info.setBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make");
//$NON-NLS-1$
info.setBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, "");
//$NON-NLS-1$
info.setUseDefaultBuildCmd(true);
info.setStopOnError(true);
info.setIncrementalBuildEnable(true);
info.setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL, "all");

--------------------------------------------------------------------------
--------------

Which I don´t know how to use it together with IMakeTarget, and I don´t
know if I even need it.
PLEASE help me with this. Is really difficult to guess how it works
without any help...

Thank you in advance
Tomas

Tomas wrote:
Hi

I'm extending CDT to create an IDE platform for embedded projects. I'm
using standard Make projects, Eclipse 3.1.2 and CDT 3.0.2.
I have made a new project wizard that creates certain files when the
"Finish" button is pressed. Additionally I need to add a make target
to the new project I'm creating (also when the Finish button is
pressed, in order to make it automatically). This make target should
appear in the "Make targets" view, inside the node of the new project
that is being created.
I read somewhere that I should use IMakeBuilderInfo and IMakeTarget,
but I have unsuccessfully searched on how to specifically do that.

Any help would be really appreciated
Best regards

Tomas
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev





Back to the top