mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Marked those strings that are non-translatable as such and externalized those strings that can be translated. There is still work to be done in this area for this plugin.
This commit is contained in:
parent
b529cdd23d
commit
8503542b55
13 changed files with 578 additions and 547 deletions
|
@ -1,425 +1,443 @@
|
||||||
2004-03-02 Sean Evoy
|
2004-03-02 James Ciesielski
|
||||||
Work to support feature C1, "Set Tool Command in Project".
|
Marked those strings that are non-translatable as such and externalized
|
||||||
Now it is possible to store an overridden tool command in a tool
|
those strings that can be translated. There is still work to be done in
|
||||||
reference. The tool command can be overridden directly in an
|
this area for this plugin.
|
||||||
existing reference, or through the configuration, which creates a
|
|
||||||
new tool reference.
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderManager.java
|
||||||
2004-02-26 Jeremiah Lott
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedCProjectNature.java
|
||||||
Added a header to the automatically generated makefiles to alert users
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
||||||
not to edit them. Also added includes directives to bring in user-supplied
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
makefiles to support additional targets, macro definitions, and custom
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
build steps. Strings are externalized.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
2004-02-26 Sean Evoy
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
||||||
Work for C14, add the ability to inherit a tool description via a tool
|
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
||||||
reference.
|
|
||||||
|
2004-03-02 Sean Evoy
|
||||||
Changed the schema to allow a tool reference to belong to a target.
|
Work to support feature C1, "Set Tool Command in Project".
|
||||||
* schema/ManagedBuildTools.exsd
|
Now it is possible to store an overridden tool command in a tool
|
||||||
|
reference. The tool command can be overridden directly in an
|
||||||
Changed the manifest logic in the managed build manager to load and
|
existing reference, or through the configuration, which creates a
|
||||||
retrieve tool definitions as well as target definitions. The schema
|
new tool reference.
|
||||||
allowed for this, but the logic was missing.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
|
2004-02-26 Jeremiah Lott
|
||||||
|
Added a header to the automatically generated makefiles to alert users
|
||||||
Made some bookeeping additions to the target so that it can store references
|
not to edit them. Also added includes directives to bring in user-supplied
|
||||||
to tools. First, the target loads any tool references it has. Then it loads
|
makefiles to support additional targets, macro definitions, and custom
|
||||||
tools and configurations. The target also has to consider the presence of tool
|
build steps. Strings are externalized.
|
||||||
references when it determines how many tools it has, so the logic that counted
|
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
||||||
and returned the number of tools in the target was updated. Some key changes in
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
this regard relate to how the target looks up the tool references it has. It
|
|
||||||
now has to ask the managed build info if it has a tool definition for the reference
|
2004-02-26 Sean Evoy
|
||||||
if there are no tools defined for the target level for a given reference.
|
Work for C14, add the ability to inherit a tool description via a tool
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
reference.
|
||||||
|
|
||||||
Tool references now have the potential to be owned by either a target or a
|
Changed the schema to allow a tool reference to belong to a target.
|
||||||
configuration. Changed the owner to the superclass of both and figure out
|
* schema/ManagedBuildTools.exsd
|
||||||
which the parent is at runtime to perform the proper registration and information
|
|
||||||
look-up. Also removed the reference to a target from a tool and the interface to
|
Changed the manifest logic in the managed build manager to load and
|
||||||
extract the target from ITool.
|
retrieve tool definitions as well as target definitions. The schema
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
allowed for this, but the logic was missing.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
|
||||||
|
Made some bookeeping additions to the target so that it can store references
|
||||||
An unrelated bug had to do with a problem my testing uncovered with nested
|
to tools. First, the target loads any tool references it has. Then it loads
|
||||||
categories. The manifest reader was looking at the wrong field to determine
|
tools and configurations. The target also has to consider the presence of tool
|
||||||
the parent, but for the manifests we have created, this has not proven to be
|
references when it determines how many tools it has, so the logic that counted
|
||||||
a problem so far.
|
and returned the number of tools in the target was updated. Some key changes in
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IOptionCategory.java
|
this regard relate to how the target looks up the tool references it has. It
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IOptionCategory.java
|
now has to ask the managed build info if it has a tool definition for the reference
|
||||||
|
if there are no tools defined for the target level for a given reference.
|
||||||
2004-02-24 Sean Evoy
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
Changed the makefile generator to escape any whitespace it finds in a dependency
|
|
||||||
path. Now it is possible to build a project in a location with spaces but
|
Tool references now have the potential to be owned by either a target or a
|
||||||
you still cannot have internal folders with spaces in the name.
|
configuration. Changed the owner to the superclass of both and figure out
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
which the parent is at runtime to perform the proper registration and information
|
||||||
|
look-up. Also removed the reference to a target from a tool and the interface to
|
||||||
Tweaked the builder to put only the make command in invocation if there were
|
extract the target from ITool.
|
||||||
no arguments spec'd. It seemed to be causing a fake error message
|
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
||||||
to be reported on Linux even though make was successfully building the project.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
||||||
|
|
||||||
2004-02-23 Sean Evoy
|
An unrelated bug had to do with a problem my testing uncovered with nested
|
||||||
Fix for bug 52647.
|
categories. The manifest reader was looking at the wrong field to determine
|
||||||
In 1.2, the target stored the raw, overridden build command the user
|
the parent, but for the manifests we have created, this has not proven to be
|
||||||
specified on the property page. This string may or may not have included
|
a problem so far.
|
||||||
arguments to make. The managed build info was responsible for parsing the
|
* src/org/eclipse/cdt/managedbuilder/core/IOptionCategory.java
|
||||||
command from the arguments and returning both to the makefile generator.
|
* src/org/eclipse/cdt/managedbuilder/core/IOptionCategory.java
|
||||||
The problem was that the logic was too light-weight to really parse a
|
|
||||||
complex command line. That logic has been refactored to the property page itself,
|
2004-02-24 Sean Evoy
|
||||||
so the price of parsing is payed once.
|
Changed the makefile generator to escape any whitespace it finds in a dependency
|
||||||
|
path. Now it is possible to build a project in a location with spaces but
|
||||||
The Target and its public interface have been reworked to set and get the
|
you still cannot have internal folders with spaces in the name.
|
||||||
arguments for make. This is treated as a project-level setting. It cannot
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
be defined in a manifest for now. There is also a capability to reset and
|
|
||||||
test the args when checking for an overridden make command in a target.
|
Tweaked the builder to put only the make command in invocation if there were
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
no arguments spec'd. It seemed to be causing a fake error message
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
to be reported on Linux even though make was successfully building the project.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
The arguments are now passed to the spawner that launches make correctly.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
2004-02-23 Sean Evoy
|
||||||
|
Fix for bug 52647.
|
||||||
The ManagedBuildInfo is off the hook now. Rather than performing any
|
In 1.2, the target stored the raw, overridden build command the user
|
||||||
parsing or foo-fa-raw, it simply delegates the lookup to the target.
|
specified on the property page. This string may or may not have included
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
arguments to make. The managed build info was responsible for parsing the
|
||||||
|
command from the arguments and returning both to the makefile generator.
|
||||||
2004-02-17 Sean Evoy
|
The problem was that the logic was too light-weight to really parse a
|
||||||
Fix for critical bug 44163.
|
complex command line. That logic has been refactored to the property page itself,
|
||||||
The managed build info would become confused when the project it was associated
|
so the price of parsing is payed once.
|
||||||
with was renamed. The project still stored the build information in its session
|
|
||||||
data, but the internal reference to the owner project was not updated in the
|
The Target and its public interface have been reworked to set and get the
|
||||||
build info. Now, when the build info is retrieved from a project, the manager
|
arguments for make. This is treated as a project-level setting. It cannot
|
||||||
asks the info to do a sanity test to check the identity of the true owner against
|
be defined in a manifest for now. There is also a capability to reset and
|
||||||
the owner the it thinks it has. If they differ, the build information updates its
|
test the args when checking for an overridden make command in a target.
|
||||||
owner and the owner of all the targets it maintains for the project.
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
The arguments are now passed to the spawner that launches make correctly.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
|
|
||||||
|
The ManagedBuildInfo is off the hook now. Rather than performing any
|
||||||
Fixes for 51646
|
parsing or foo-fa-raw, it simply delegates the lookup to the target.
|
||||||
Moved the makefile comment character out of the hard-coded strings and into
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
the makefile generator.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
2004-02-17 Sean Evoy
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
Fix for critical bug 44163.
|
||||||
|
The managed build info would become confused when the project it was associated
|
||||||
Fixes for bug 49590:
|
with was renamed. The project still stored the build information in its session
|
||||||
The target maintains the default extension and the overridden extension. There
|
data, but the internal reference to the owner project was not updated in the
|
||||||
is an interface to get and set the extension, but the method to get the default
|
build info. Now, when the build info is retrieved from a project, the manager
|
||||||
extension is deprecated.
|
asks the info to do a sanity test to check the identity of the true owner against
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
the owner the it thinks it has. If they differ, the build information updates its
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
owner and the owner of all the targets it maintains for the project.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
|
||||||
The build information now has a method to get at the extension
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
|
|
||||||
The makefile generator now asks for both the name and the extension when
|
|
||||||
generating targets and dependencies.
|
Fixes for 51646
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
Moved the makefile comment character out of the hard-coded strings and into
|
||||||
|
the makefile generator.
|
||||||
2003-10-23 Bogdan Gheorghe
|
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
||||||
Updated the indexManager.perfomConcurrentJob call in MakefileGenerator
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
|
|
||||||
2003-10-03 Sean Evoy
|
Fixes for bug 49590:
|
||||||
Fix for critical bug 44134.
|
The target maintains the default extension and the overridden extension. There
|
||||||
|
is an interface to get and set the extension, but the method to get the default
|
||||||
The problem lies in how the makefile is generated when a build target
|
extension is deprecated.
|
||||||
references other projects. The makefile creates a command to change to
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
the build directory of the referenced project and call $(MAKE) there, i.e.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
cd <dep_project_build_dir>; $(MAKE) clean all
|
|
||||||
|
The build information now has a method to get at the extension
|
||||||
The problem arises when the directory change fails. As of RC0, the command
|
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
||||||
after the semi-colon is evaluated. Unfortunately, it evaluates to a recursive
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
make call in the build directory of the build target and 'make' will keep
|
|
||||||
invoking more 'make's until Eclipse runs out of memory. With a manual build,
|
The makefile generator now asks for both the name and the extension when
|
||||||
the user can still cancel the build. When autobuild is turned on, they cannot.
|
generating targets and dependencies.
|
||||||
The only way to shut down Eclipse under that scenario is to kill it, and when
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
it restarts, autobuild is still enabled and the problem repeats.
|
|
||||||
|
2003-10-23 Bogdan Gheorghe
|
||||||
The solution is to NOT perform the 'make' command if the 'cd' fails, i.e.
|
Updated the indexManager.perfomConcurrentJob call in MakefileGenerator
|
||||||
cd <dep_project_build_dir> && $(MAKE) clean all
|
|
||||||
|
2003-10-03 Sean Evoy
|
||||||
When the dependencies are generated this way, the 'cd' will fail as will the
|
Fix for critical bug 44134.
|
||||||
build. The final tweak is to ignore the 'cd' failure and allow the rest of
|
|
||||||
the build to continue, i.e.
|
The problem lies in how the makefile is generated when a build target
|
||||||
-cd <dep_project_build_dir> && $(MAKE) clean all
|
references other projects. The makefile creates a command to change to
|
||||||
|
the build directory of the referenced project and call $(MAKE) there, i.e.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
cd <dep_project_build_dir>; $(MAKE) clean all
|
||||||
|
|
||||||
2003-10-01 Sean Evoy
|
The problem arises when the directory change fails. As of RC0, the command
|
||||||
Final fix for bugs 44020.
|
after the semi-colon is evaluated. Unfortunately, it evaluates to a recursive
|
||||||
The problem lay with the way that new projects were being created when the
|
make call in the build directory of the build target and 'make' will keep
|
||||||
root configuration of the project had tool references overriding options.
|
invoking more 'make's until Eclipse runs out of memory. With a manual build,
|
||||||
What the new configuration should have been doing is making a personal copy
|
the user can still cancel the build. When autobuild is turned on, they cannot.
|
||||||
of the tool reference and its options. Instead, they were all sharing the
|
The only way to shut down Eclipse under that scenario is to kill it, and when
|
||||||
parents. Seems simple enough now that I found it.
|
it restarts, autobuild is still enabled and the problem repeats.
|
||||||
|
|
||||||
OptionReference provides a method to retreive its option (so new
|
The solution is to NOT perform the 'make' command if the 'cd' fails, i.e.
|
||||||
OptionReferences can be cloned).
|
cd <dep_project_build_dir> && $(MAKE) clean all
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
|
||||||
|
When the dependencies are generated this way, the 'cd' will fail as will the
|
||||||
Configuration now behaves correctly when it is created from another configuration.
|
build. The final tweak is to ignore the 'cd' failure and allow the rest of
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
the build to continue, i.e.
|
||||||
|
-cd <dep_project_build_dir> && $(MAKE) clean all
|
||||||
2003-10-01 Sean Evoy
|
|
||||||
Fix for bugs 43490 (trivial), 44020, and 43980.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
Added a new field to the schema for a tool. The attribute manages a list of
|
|
||||||
project natures that the tool should be filtered against in the build model
|
2003-10-01 Sean Evoy
|
||||||
and UI.
|
Final fix for bugs 44020.
|
||||||
* schema/ManagedBuildTools.exsd
|
The problem lay with the way that new projects were being created when the
|
||||||
|
root configuration of the project had tool references overriding options.
|
||||||
Updated the ITool interface and its mplementors to pay attention to this new
|
What the new configuration should have been doing is making a personal copy
|
||||||
attribute when loading from a plugin file. Clients can querry for a numeric
|
of the tool reference and its options. Instead, they were all sharing the
|
||||||
constant indicating the filter.
|
parents. Seems simple enough now that I found it.
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
OptionReference provides a method to retreive its option (so new
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
OptionReferences can be cloned).
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
||||||
All the methods in managed build manager that access information stored in a tool
|
|
||||||
first check that the tool is valid for the project nature.
|
Configuration now behaves correctly when it is created from another configuration.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
||||||
|
|
||||||
Put a safety check in the option reference constructor when reading one in from
|
2003-10-01 Sean Evoy
|
||||||
a project file. I the option reference is to an option not managed by the build
|
Fix for bugs 43490 (trivial), 44020, and 43980.
|
||||||
model, the constructor does not add itself to the runtime representation of the
|
Added a new field to the schema for a tool. The attribute manages a list of
|
||||||
model.
|
project natures that the tool should be filtered against in the build model
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
and UI.
|
||||||
|
* schema/ManagedBuildTools.exsd
|
||||||
In preparation for 44020, each new target created is assigned a truly random ID.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
Updated the ITool interface and its mplementors to pay attention to this new
|
||||||
|
attribute when loading from a plugin file. Clients can querry for a numeric
|
||||||
2003-09-30 Sean Evoy
|
constant indicating the filter.
|
||||||
Fix for bug 41826.
|
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
||||||
Finished the use case for changing header files and triggering a build. I had
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
||||||
to add a new attribute to the build model schema to allow a build information
|
|
||||||
client to determine that a file is considered a header file.
|
All the methods in managed build manager that access information stored in a tool
|
||||||
* schema/ManagedBuildTools.exsd
|
first check that the tool is valid for the project nature.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
The ITool, and its implementors now have a method to test if an extension is
|
|
||||||
considered to belong to a header file. The Tool also pays attention to the new
|
Put a safety check in the option reference constructor when reading one in from
|
||||||
attribute when it reads itself in from the plugin file.
|
a project file. I the option reference is to an option not managed by the build
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
model, the constructor does not add itself to the runtime representation of the
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
model.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
||||||
|
|
||||||
There is a method for clients of this information on the BuildInfo interface and
|
In preparation for 44020, each new target created is assigned a truly random ID.
|
||||||
its implementor.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
2003-09-30 Sean Evoy
|
||||||
|
Fix for bug 41826.
|
||||||
The builder had to be tweaked in order to behave correctly on a build of an
|
|
||||||
empty project or non-managed projects.
|
Finished the use case for changing header files and triggering a build. I had
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
to add a new attribute to the build model schema to allow a build information
|
||||||
|
client to determine that a file is considered a header file.
|
||||||
The makefile generator had to be tweaked to properly add folders that are effected
|
* schema/ManagedBuildTools.exsd
|
||||||
by header file changes.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
The ITool, and its implementors now have a method to test if an extension is
|
||||||
|
considered to belong to a header file. The Tool also pays attention to the new
|
||||||
2003-09-26 Sean Evoy
|
attribute when it reads itself in from the plugin file.
|
||||||
A partial implementation for bug 41826. This patch contains the logic to properly
|
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
||||||
respond in the face of the following project changes:
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
||||||
1. A generated project element, such as the build target or an intermediate file,
|
|
||||||
is deleted in the build project, or any projects it references.
|
There is a method for clients of this information on the BuildInfo interface and
|
||||||
2. The build settings change in the build project or any projects it
|
its implementor.
|
||||||
references.
|
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
In order to actually do this correctly, I had to stop being so precious during the
|
|
||||||
build. The makefile generator was was calculating the "build needed" state as it
|
The builder had to be tweaked in order to behave correctly on a build of an
|
||||||
walked the change delta. However, the Eclipse core has already determined that I
|
empty project or non-managed projects.
|
||||||
need to do a build. Further, as I discovered earlier, it doesn't always pass what
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
has changed in referenced projects as part of the delta. Essentially, that means I
|
|
||||||
will never be able to fully calculate the change set in the makefile generator's
|
The makefile generator had to be tweaked to properly add folders that are effected
|
||||||
delta visitor, and to even approximate a decent set of cases, the logic would quickly
|
by header file changes.
|
||||||
bog down in complexity.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
|
|
||||||
The solution is to trust Eclipse and alway invoke make when my incremental builder
|
2003-09-26 Sean Evoy
|
||||||
is called. At worst, if there is no significant change, make will execute and
|
A partial implementation for bug 41826. This patch contains the logic to properly
|
||||||
report nothing to be done.
|
respond in the face of the following project changes:
|
||||||
|
|
||||||
The modified makefile builder no longer asks the makefile generator if it should
|
1. A generated project element, such as the build target or an intermediate file,
|
||||||
build. It also no longer cares if the change set is empty (make will report that).
|
is deleted in the build project, or any projects it references.
|
||||||
Since it responds to changes in referenced project's build information, it also
|
2. The build settings change in the build project or any projects it
|
||||||
scrubs all relevant projects after building. Since a build might involve building
|
references.
|
||||||
referenced project elements, those projects get their project views refreshed after
|
|
||||||
build. The build markers for referenced projects are removed prior to build.
|
In order to actually do this correctly, I had to stop being so precious during the
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
build. The makefile generator was was calculating the "build needed" state as it
|
||||||
|
walked the change delta. However, the Eclipse core has already determined that I
|
||||||
The makefile generator has been simplified. The resource delta visitor logic no
|
need to do a build. Further, as I discovered earlier, it doesn't always pass what
|
||||||
longer trie to decide if a build should occur. The method to ask has been removed.
|
has changed in referenced projects as part of the delta. Essentially, that means I
|
||||||
The class no longer throws an exception if the change set is empty. I am also a bit
|
will never be able to fully calculate the change set in the makefile generator's
|
||||||
more careful to call make with the right targets if a referenced project is built.
|
delta visitor, and to even approximate a decent set of cases, the logic would quickly
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
bog down in complexity.
|
||||||
|
|
||||||
2003-09-26 Sean Evoy
|
The solution is to trust Eclipse and alway invoke make when my incremental builder
|
||||||
I added a fix to the builder and makefile generator to properly handle the following case.
|
is called. At worst, if there is no significant change, make will execute and
|
||||||
Project A depends on Project B. Something changes in project B and the user requests
|
report nothing to be done.
|
||||||
that A be built. Inthis case, the incremental builder is invoked, but it is passed a
|
|
||||||
0-length delta on the top resource. Now, the logic of the builder is to treat that case as a
|
The modified makefile builder no longer asks the makefile generator if it should
|
||||||
build event that triggers no makefile regeneration, just an invocation of make.
|
build. It also no longer cares if the change set is empty (make will report that).
|
||||||
|
Since it responds to changes in referenced project's build information, it also
|
||||||
Now handles the case where there is no flag applied to the make command and just
|
scrubs all relevant projects after building. Since a build might involve building
|
||||||
passes the targets as arguments.
|
referenced project elements, those projects get their project views refreshed after
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
build. The build markers for referenced projects are removed prior to build.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
The makefile generator now considers the case where the delta is for a project resource
|
|
||||||
and has no children. If so, it flags that a build is needed but no makefile generation
|
The makefile generator has been simplified. The resource delta visitor logic no
|
||||||
occurs. It also throws a new exception if the top makefile is not saved.
|
longer trie to decide if a build should occur. The method to ask has been removed.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
The class no longer throws an exception if the change set is empty. I am also a bit
|
||||||
|
more careful to call make with the right targets if a referenced project is built.
|
||||||
2003-09-25 Sean Evoy
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
A patch to resolve the problem with refreshing the project after a build, or
|
|
||||||
bug 42522 if you care about those sorts of things. The managed make builder was
|
2003-09-26 Sean Evoy
|
||||||
calling refresh at inside a bad if statement. I corrected that and projects
|
I added a fix to the builder and makefile generator to properly handle the following case.
|
||||||
refresh correctly. Of course, if you have the wrong binary parser selected you are
|
Project A depends on Project B. Something changes in project B and the user requests
|
||||||
hosed. You will also notice that the string constants have been changed to
|
that A be built. Inthis case, the incremental builder is invoked, but it is passed a
|
||||||
resolve to a different name. The standard builder uses this name and I wanted
|
0-length delta on the top resource. Now, the logic of the builder is to treat that case as a
|
||||||
to minimize the possibility of problems later.
|
build event that triggers no makefile regeneration, just an invocation of make.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
|
||||||
|
Now handles the case where there is no flag applied to the make command and just
|
||||||
Prepended "Managed" to the externalized string identifiers to avoid future overlap
|
passes the targets as arguments.
|
||||||
with the standard build system. Had to update the makefile generator to use the
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
new identifiers.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
The makefile generator now considers the case where the delta is for a project resource
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
and has no children. If so, it flags that a build is needed but no makefile generation
|
||||||
|
occurs. It also throws a new exception if the top makefile is not saved.
|
||||||
Changed the signature of the 'getMakeArguments' to return a string instead of an
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
array so the builder can invoke make with the user-specified args. I also changed
|
|
||||||
the logic of the getMakeCommand method in the implementor so that it only returns
|
2003-09-25 Sean Evoy
|
||||||
a string containing the command itself.
|
A patch to resolve the problem with refreshing the project after a build, or
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
bug 42522 if you care about those sorts of things. The managed make builder was
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
calling refresh at inside a bad if statement. I corrected that and projects
|
||||||
|
refresh correctly. Of course, if you have the wrong binary parser selected you are
|
||||||
Explicitly trim all arrays to size before converting them to String[] for Options
|
hosed. You will also notice that the string constants have been changed to
|
||||||
and Tools.
|
resolve to a different name. The standard builder uses this name and I wanted
|
||||||
*src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
|
to minimize the possibility of problems later.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
|
|
||||||
Fixed a missing bit of logic in the Configuration when a user-object option is
|
Prepended "Managed" to the externalized string identifiers to avoid future overlap
|
||||||
deleted. Now the build model really does get rid of the the value.
|
with the standard build system. Had to update the makefile generator to use the
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
new identifiers.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
||||||
2003-09-25 Sean Evoy
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
This patch contains a lot of changes needed to implement fixes for 42648 and
|
|
||||||
43122.
|
Changed the signature of the 'getMakeArguments' to return a string instead of an
|
||||||
|
array so the builder can invoke make with the user-specified args. I also changed
|
||||||
For 42648, the schema for the the target had to be modified to include a
|
the logic of the getMakeCommand method in the implementor so that it only returns
|
||||||
comma-separated list of valid host platforms.
|
a string containing the command itself.
|
||||||
* schema/ManagedBuildTools.exsd
|
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
The target had to be updated to properly read in and understand this info, and
|
|
||||||
the interface had to be updated to return a list to the clients in the UI. The
|
Explicitly trim all arrays to size before converting them to String[] for Options
|
||||||
target was also changed slightly. It now uses a safer accessor method to get at
|
and Tools.
|
||||||
the list of tools it maintains. I have also stopped persisting non-variant info
|
*src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
|
||||||
to the project file on serialize. There are elements of the target that are not
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
||||||
subject to change by the user (yet) so they should not be saved.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
Fixed a missing bit of logic in the Configuration when a user-object option is
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
deleted. Now the build model really does get rid of the the value.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
||||||
For 43122, I started by simply adding a tool reference to the configurations.
|
|
||||||
The tool reference had option references for debug and optimization levels. It
|
2003-09-25 Sean Evoy
|
||||||
should have worked, but the model was not handling the inheritance properly. The
|
This patch contains a lot of changes needed to implement fixes for 42648 and
|
||||||
JUnit tests were not finding it because of how they were configured. It was most
|
43122.
|
||||||
evident in the UI. So, the way configurations and tool reference search for
|
|
||||||
overridden option references had to be modified. While I was in there, I cleaned
|
For 42648, the schema for the the target had to be modified to include a
|
||||||
up some of the accessor and iteration code in ToolReference and OptionReference.
|
comma-separated list of valid host platforms.
|
||||||
|
* schema/ManagedBuildTools.exsd
|
||||||
For the configuration, the only significant change was a new search method to
|
|
||||||
find all option references for a given tool, no matter where they are stored.
|
The target had to be updated to properly read in and understand this info, and
|
||||||
The method had to consider what was overridden in a child config, what was added by
|
the interface had to be updated to return a list to the clients in the UI. The
|
||||||
a child config, and what the parent (or parents) define.
|
target was also changed slightly. It now uses a safer accessor method to get at
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
the list of tools it maintains. I have also stopped persisting non-variant info
|
||||||
|
to the project file on serialize. There are elements of the target that are not
|
||||||
Option reference now pays attention to overidden values in the plugin file. Until
|
subject to change by the user (yet) so they should not be saved.
|
||||||
now, it only handled the overrides in the project file.
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
|
|
||||||
The ToolReference now distinguishes between local option references which it
|
For 43122, I started by simply adding a tool reference to the configurations.
|
||||||
manages directly, and option references held by tool references in the parent(s)
|
The tool reference had option references for debug and optimization levels. It
|
||||||
of its owner. It only serializes its own references, but when asked for options
|
should have worked, but the model was not handling the inheritance properly. The
|
||||||
relating to the tool it references, it replies with all option references in its
|
JUnit tests were not finding it because of how they were configured. It was most
|
||||||
hierarchy.
|
evident in the UI. So, the way configurations and tool reference search for
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
overridden option references had to be modified. While I was in there, I cleaned
|
||||||
|
up some of the accessor and iteration code in ToolReference and OptionReference.
|
||||||
|
|
||||||
2003-09-25 Bogdan Gheorghe
|
For the configuration, the only significant change was a new search method to
|
||||||
Modified ResourceDeltaVisitor.visit() to use the new mechanism to get the
|
find all option references for a given tool, no matter where they are stored.
|
||||||
projects that dependend a file.
|
The method had to consider what was overridden in a child config, what was added by
|
||||||
|
a child config, and what the parent (or parents) define.
|
||||||
Modified addSourceDependencies() to use the new mechanism to perform a DependencyQueryJob
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
||||||
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakeFileGenerator.java
|
Option reference now pays attention to overidden values in the plugin file. Until
|
||||||
|
now, it only handled the overrides in the project file.
|
||||||
2003-09-24 Sean Evoy
|
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
||||||
Changed the implementor of IScannerInfo to answer only absolute paths when asked for
|
|
||||||
includes paths. Users will specify the includes paths in the managed build UI in such a way
|
The ToolReference now distinguishes between local option references which it
|
||||||
that the compiler will not complain. Either they will use absolute paths, or they will specify
|
manages directly, and option references held by tool references in the parent(s)
|
||||||
them relative to the build directory. In the second case, it is easier for the managed builder
|
of its owner. It only serializes its own references, but when asked for options
|
||||||
to convert the paths relative to this directory into absolute paths before replying tha it is for
|
relating to the tool it references, it replies with all option references in its
|
||||||
the client to figure this out.
|
hierarchy.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
||||||
|
|
||||||
2003-09-23 Sean Evoy
|
|
||||||
All the work in this patch is for critical bug 43292. In order to manage
|
2003-09-25 Bogdan Gheorghe
|
||||||
configurations, there had to be a method through ITarget to remove
|
Modified ResourceDeltaVisitor.visit() to use the new mechanism to get the
|
||||||
configurations. Also, to support the naming of newly created configurations,
|
projects that dependend a file.
|
||||||
I added a name method to the IConfiguration interface. Finally, the ITarget
|
|
||||||
needed to support setting (and resetting) the make command to use when building.
|
Modified addSourceDependencies() to use the new mechanism to perform a DependencyQueryJob
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IConfiguration.java
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakeFileGenerator.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
|
||||||
|
2003-09-24 Sean Evoy
|
||||||
2003-09-19 Sean Evoy
|
Changed the implementor of IScannerInfo to answer only absolute paths when asked for
|
||||||
Added a new field to the target specification in the build model to
|
includes paths. Users will specify the includes paths in the managed build UI in such a way
|
||||||
hard-code the binary parser for project creation. There is a new getter
|
that the compiler will not complain. Either they will use absolute paths, or they will specify
|
||||||
method in the interface and the implementor contains additional code to
|
them relative to the build directory. In the second case, it is easier for the managed builder
|
||||||
extract the information from a project file or plugin manifest. The
|
to convert the paths relative to this directory into absolute paths before replying tha it is for
|
||||||
interface also contains new strings to make changing the specification
|
the client to figure this out.
|
||||||
easier in the future.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
* schema/ManagedBuildTools.exsd
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
2003-09-23 Sean Evoy
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
All the work in this patch is for critical bug 43292. In order to manage
|
||||||
|
configurations, there had to be a method through ITarget to remove
|
||||||
Fix for bug 41720: libraries are now found for Solaris and Linux
|
configurations. Also, to support the naming of newly created configurations,
|
||||||
executables. The problem was the executable had no extension and
|
I added a name method to the IConfiguration interface. Finally, the ITarget
|
||||||
the client of the build model passed null instead of the empty string.
|
needed to support setting (and resetting) the make command to use when building.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
* src/org/eclipse/cdt/managedbuilder/core/IConfiguration.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
2003-09-16 Sean Evoy
|
|
||||||
Patch contains a fix for bug 43017. Renamed the "addDeps" method to a
|
2003-09-19 Sean Evoy
|
||||||
more descriptive "addSourceDependencies". Added a flag when the
|
Added a new field to the target specification in the build model to
|
||||||
inter-project dependencies are calculated so that clean and all are
|
hard-code the binary parser for project creation. There is a new getter
|
||||||
properly passed to the make invocation. Finally, I replaced the hard-coded
|
method in the interface and the implementor contains additional code to
|
||||||
'make' with $(MAKE)
|
extract the information from a project file or plugin manifest. The
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
interface also contains new strings to make changing the specification
|
||||||
|
easier in the future.
|
||||||
It also contains some more work on 41826, specifically on the logic to
|
* schema/ManagedBuildTools.exsd
|
||||||
implement a rebuild when the build settings change. The builder checks for
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
a build model change whenever a build is requested and responds appropriately.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
The make targets (i.e. 'clean' and 'all') are also calculated differently now.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
Fix for bug 41720: libraries are now found for Solaris and Linux
|
||||||
|
executables. The problem was the executable had no extension and
|
||||||
The build model was modified to set a dirty flag when an option changes. I also
|
the client of the build model passed null instead of the empty string.
|
||||||
made a change to avoid an NPE when the build info was loaded.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
|
2003-09-16 Sean Evoy
|
||||||
|
Patch contains a fix for bug 43017. Renamed the "addDeps" method to a
|
||||||
|
more descriptive "addSourceDependencies". Added a flag when the
|
||||||
2003-09-15 Sean Evoy
|
inter-project dependencies are calculated so that clean and all are
|
||||||
First submission of code to new project. Moved the managed builder
|
properly passed to the make invocation. Finally, I replaced the hard-coded
|
||||||
source code out of the cdt.core project. This includes the code to
|
'make' with $(MAKE)
|
||||||
implement the build model, along with the shema and extension point
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
declaration. Moved the builder, scnanaer info provider and managed
|
|
||||||
nature definitions into the package as well.
|
It also contains some more work on 41826, specifically on the logic to
|
||||||
|
implement a rebuild when the build settings change. The builder checks for
|
||||||
There are 2 new classes to handle the externalized strings:
|
a build model change whenever a build is requested and responds appropriately.
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java
|
The make targets (i.e. 'clean' and 'all') are also calculated differently now.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
|
|
||||||
|
The build model was modified to set a dirty flag when an option changes. I also
|
||||||
|
made a change to avoid an NPE when the build info was loaded.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
|
||||||
|
|
||||||
|
|
||||||
|
2003-09-15 Sean Evoy
|
||||||
|
First submission of code to new project. Moved the managed builder
|
||||||
|
source code out of the cdt.core project. This includes the code to
|
||||||
|
implement the build model, along with the shema and extension point
|
||||||
|
declaration. Moved the builder, scnanaer info provider and managed
|
||||||
|
nature definitions into the package as well.
|
||||||
|
|
||||||
|
There are 2 new classes to handle the externalized strings:
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
|
@ -14,6 +14,8 @@ package org.eclipse.cdt.managedbuilder.core;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface IManagedBuildInfo {
|
public interface IManagedBuildInfo {
|
||||||
|
public static final String DEFAULT_TARGET = "defaultTarget"; //$NON-NLS-1$
|
||||||
|
public static final String DEFAULT_CONFIGURATION = "defaultConfig"; //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new target to the build information for the receiver
|
* Add a new target to the build information for the receiver
|
||||||
|
|
|
@ -34,6 +34,7 @@ import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
|
||||||
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
|
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
|
import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
|
||||||
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Target;
|
import org.eclipse.cdt.managedbuilder.internal.core.Target;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Tool;
|
import org.eclipse.cdt.managedbuilder.internal.core.Tool;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
|
@ -55,7 +56,7 @@ import org.w3c.dom.Node;
|
||||||
*/
|
*/
|
||||||
public class ManagedBuildManager extends AbstractCExtension implements IScannerInfoProvider {
|
public class ManagedBuildManager extends AbstractCExtension implements IScannerInfoProvider {
|
||||||
|
|
||||||
private static final QualifiedName buildInfoProperty = new QualifiedName(ManagedBuilderCorePlugin.getUniqueIdentifier(), "managedBuildInfo");
|
private static final QualifiedName buildInfoProperty = new QualifiedName(ManagedBuilderCorePlugin.getUniqueIdentifier(), "managedBuildInfo"); //$NON-NLS-1$
|
||||||
private static final String ROOT_ELEM_NAME = "ManagedProjectBuildInfo"; //$NON-NLS-1$
|
private static final String ROOT_ELEM_NAME = "ManagedProjectBuildInfo"; //$NON-NLS-1$
|
||||||
private static final String FILE_NAME = ".cdtbuild"; //$NON-NLS-1$
|
private static final String FILE_NAME = ".cdtbuild"; //$NON-NLS-1$
|
||||||
private static final ITarget[] emptyTargets = new ITarget[0];
|
private static final ITarget[] emptyTargets = new ITarget[0];
|
||||||
|
@ -63,7 +64,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
public static final String EXTENSION_POINT_ID = "ManagedBuildInfo"; //$NON-NLS-1$
|
public static final String EXTENSION_POINT_ID = "ManagedBuildInfo"; //$NON-NLS-1$
|
||||||
|
|
||||||
// This is the version of the manifest and project files that
|
// This is the version of the manifest and project files that
|
||||||
private static final String buildInfoVersion = "2.0.0";
|
private static final String buildInfoVersion = "2.0.0"; //$NON-NLS-1$
|
||||||
private static boolean extensionTargetsLoaded = false;
|
private static boolean extensionTargetsLoaded = false;
|
||||||
private static Map extensionTargetMap;
|
private static Map extensionTargetMap;
|
||||||
private static List extensionTargets;
|
private static List extensionTargets;
|
||||||
|
@ -298,7 +299,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
String xml = null;
|
String xml = null;
|
||||||
try {
|
try {
|
||||||
Serializer serializer
|
Serializer serializer
|
||||||
= SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(new OutputStreamWriter(s, "UTF8"), format);
|
= SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(new OutputStreamWriter(s, "UTF8"), format); //$NON-NLS-1$
|
||||||
serializer.asDOMSerializer().serialize(doc);
|
serializer.asDOMSerializer().serialize(doc);
|
||||||
xml = s.toString("UTF8"); //$NON-NLS-1$
|
xml = s.toString("UTF8"); //$NON-NLS-1$
|
||||||
IFile rscFile = project.getFile(FILE_NAME);
|
IFile rscFile = project.getFile(FILE_NAME);
|
||||||
|
@ -405,13 +406,13 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
if (resource instanceof IProject) {
|
if (resource instanceof IProject) {
|
||||||
// Must be an extension target (why?)
|
// Must be an extension target (why?)
|
||||||
if (owner != null)
|
if (owner != null)
|
||||||
throw new BuildException("addTarget: owner not null");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("ManagedBuildManager.error.owner_not_null")); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
// Owner must be owned by the project containing this resource
|
// Owner must be owned by the project containing this resource
|
||||||
if (owner == null)
|
if (owner == null)
|
||||||
throw new BuildException("addTarget: null owner");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("ManagedBuildManager.error.null_owner")); //$NON-NLS-1$
|
||||||
if (!owner.equals(resource.getProject()))
|
if (!owner.equals(resource.getProject()))
|
||||||
throw new BuildException("addTarget: owner not project");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("ManagedBuildManager.error.owner_not_project")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
// Passed validation
|
// Passed validation
|
||||||
|
|
|
@ -50,9 +50,9 @@ public class ManagedBuilderCorePlugin extends Plugin {
|
||||||
try {
|
try {
|
||||||
return resourceBundle.getString(key);
|
return resourceBundle.getString(key);
|
||||||
} catch (MissingResourceException e) {
|
} catch (MissingResourceException e) {
|
||||||
return "!" + key + "!";
|
return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
return "#" + key + "#";
|
return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.core.runtime.Plugin;
|
||||||
|
|
||||||
public class ManagedCProjectNature implements IProjectNature {
|
public class ManagedCProjectNature implements IProjectNature {
|
||||||
public static final String BUILDER_NAME = "genmakebuilder";
|
public static final String BUILDER_NAME = "genmakebuilder";
|
||||||
public static final String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + BUILDER_NAME;
|
public static final String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
|
||||||
private static final String MNG_NATURE_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".managedBuildNature";
|
private static final String MNG_NATURE_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".managedBuildNature";
|
||||||
private IProject project;
|
private IProject project;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class ManagedCProjectNature implements IProjectNature {
|
||||||
// TODO Remove this when the new StandardBuild nature adds the cbuilder
|
// TODO Remove this when the new StandardBuild nature adds the cbuilder
|
||||||
for (int i = 0; i < commands.length; i++) {
|
for (int i = 0; i < commands.length; i++) {
|
||||||
ICommand command = commands[i];
|
ICommand command = commands[i];
|
||||||
if (command.getBuilderName().equals("org.eclipse.cdt.core.cbuilder")) {
|
if (command.getBuilderName().equals("org.eclipse.cdt.core.cbuilder")) { //$NON-NLS-1$
|
||||||
// Remove the command
|
// Remove the command
|
||||||
Vector vec = new Vector(Arrays.asList(commands));
|
Vector vec = new Vector(Arrays.asList(commands));
|
||||||
vec.removeElementAt(i);
|
vec.removeElementAt(i);
|
||||||
|
@ -112,7 +112,7 @@ public class ManagedCProjectNature implements IProjectNature {
|
||||||
Plugin plugin = (Plugin)ManagedBuilderCorePlugin.getDefault();
|
Plugin plugin = (Plugin)ManagedBuilderCorePlugin.getDefault();
|
||||||
IPluginDescriptor descriptor = plugin.getDescriptor();
|
IPluginDescriptor descriptor = plugin.getDescriptor();
|
||||||
if (descriptor.getExtension(BUILDER_NAME) != null) {
|
if (descriptor.getExtension(BUILDER_NAME) != null) {
|
||||||
return descriptor.getUniqueIdentifier() + "." + BUILDER_NAME;
|
return descriptor.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
return BUILDER_ID;
|
return BUILDER_ID;
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,9 +206,9 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
protected String[] getMakeTargets(boolean fullBuild) {
|
protected String[] getMakeTargets(boolean fullBuild) {
|
||||||
List args = new ArrayList();
|
List args = new ArrayList();
|
||||||
if (fullBuild) {
|
if (fullBuild) {
|
||||||
args.add("clean");
|
args.add("clean"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
args.add("all");
|
args.add("all"); //$NON-NLS-1$
|
||||||
return (String[])args.toArray(new String[args.size()]);
|
return (String[])args.toArray(new String[args.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
ArrayList makeArgs = new ArrayList();
|
ArrayList makeArgs = new ArrayList();
|
||||||
String arg = info.getMakeArguments();
|
String arg = info.getMakeArguments();
|
||||||
if (arg.length() > 0) {
|
if (arg.length() > 0) {
|
||||||
String[] args = arg.split("\\s");
|
String[] args = arg.split("\\s"); //$NON-NLS-1$
|
||||||
for (int i = 0; i < args.length; ++i) {
|
for (int i = 0; i < args.length; ++i) {
|
||||||
makeArgs.add(args[i]);
|
makeArgs.add(args[i]);
|
||||||
}
|
}
|
||||||
|
@ -406,13 +406,13 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
if (errMsg != null && errMsg.length() > 0) {
|
if (errMsg != null && errMsg.length() > 0) {
|
||||||
String errorDesc = ManagedBuilderCorePlugin.getResourceString(BUILD_ERROR);
|
String errorDesc = ManagedBuilderCorePlugin.getResourceString(BUILD_ERROR);
|
||||||
buf.append(errorDesc);
|
buf.append(errorDesc);
|
||||||
buf.append(System.getProperty("line.separator", "\n"));
|
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-2$
|
||||||
buf.append("(").append(errMsg).append(")");
|
buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
} else {
|
} else {
|
||||||
// Report a successful build
|
// Report a successful build
|
||||||
String successMsg = ManagedBuilderCorePlugin.getFormattedString(BUILD_FINISHED, currentProject.getName());
|
String successMsg = ManagedBuilderCorePlugin.getFormattedString(BUILD_FINISHED, currentProject.getName());
|
||||||
buf.append(successMsg);
|
buf.append(successMsg);
|
||||||
buf.append(System.getProperty("line.separator", "\n"));
|
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write message on the console
|
// Write message on the console
|
||||||
|
@ -421,7 +421,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
stdout.close();
|
stdout.close();
|
||||||
stderr.close();
|
stderr.close();
|
||||||
|
|
||||||
monitor.subTask(ManagedBuilderCorePlugin.getResourceString(MARKERS)); //$NON-NLS-1$
|
monitor.subTask(ManagedBuilderCorePlugin.getResourceString(MARKERS));
|
||||||
epm.reportProblems();
|
epm.reportProblems();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -321,7 +321,7 @@ public class MakefileGenerator {
|
||||||
// Calculate the new directory relative to the build output
|
// Calculate the new directory relative to the build output
|
||||||
IPath moduleRelativePath = module.getProjectRelativePath();
|
IPath moduleRelativePath = module.getProjectRelativePath();
|
||||||
String relativePath = moduleRelativePath.toString();
|
String relativePath = moduleRelativePath.toString();
|
||||||
relativePath += relativePath.length() == 0 ? "" : SEPARATOR;
|
relativePath += relativePath.length() == 0 ? "" : SEPARATOR; //$NON-NLS-1$
|
||||||
|
|
||||||
// Create the buffer to hold the output for the module and a dep calculator
|
// Create the buffer to hold the output for the module and a dep calculator
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
@ -381,13 +381,13 @@ public class MakefileGenerator {
|
||||||
*/
|
*/
|
||||||
private String escapeWhitespaces(String path) {
|
private String escapeWhitespaces(String path) {
|
||||||
// Escape the spaces in the path/filename if it has any
|
// Escape the spaces in the path/filename if it has any
|
||||||
String[] segments = path.split("\\s");
|
String[] segments = path.split("\\s"); //$NON-NLS-1$
|
||||||
if (segments.length > 1) {
|
if (segments.length > 1) {
|
||||||
StringBuffer escapedPath = new StringBuffer();
|
StringBuffer escapedPath = new StringBuffer();
|
||||||
for (int index = 0; index < segments.length; ++index) {
|
for (int index = 0; index < segments.length; ++index) {
|
||||||
escapedPath.append(segments[index]);
|
escapedPath.append(segments[index]);
|
||||||
if (index + 1 < segments.length) {
|
if (index + 1 < segments.length) {
|
||||||
escapedPath.append("\\ ");
|
escapedPath.append("\\ "); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return escapedPath.toString().trim();
|
return escapedPath.toString().trim();
|
||||||
|
@ -432,27 +432,27 @@ public class MakefileGenerator {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
|
||||||
// Add the ROOT macro
|
// Add the ROOT macro
|
||||||
buffer.append("ROOT := .." + NEWLINE);
|
buffer.append("ROOT := .." + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
|
|
||||||
// include makefile.init supplementary makefile
|
// include makefile.init supplementary makefile
|
||||||
buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_INIT + NEWLINE);
|
buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_INIT + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
|
|
||||||
// Get the clean command from the build model
|
// Get the clean command from the build model
|
||||||
buffer.append("RM := ");
|
buffer.append("RM := "); //$NON-NLS-1$
|
||||||
buffer.append(info.getCleanCommand() + NEWLINE);
|
buffer.append(info.getCleanCommand() + NEWLINE);
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
|
|
||||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(SRC_LISTS) + NEWLINE);
|
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(SRC_LISTS) + NEWLINE);
|
||||||
buffer.append("C_SRCS := " + NEWLINE);
|
buffer.append("C_SRCS := " + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append("CC_SRCS := " + NEWLINE);
|
buffer.append("CC_SRCS := " + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append("CXX_SRCS := " + NEWLINE);
|
buffer.append("CXX_SRCS := " + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append("CAPC_SRCS := " + NEWLINE);
|
buffer.append("CAPC_SRCS := " + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append("CPP_SRCS := " + NEWLINE + NEWLINE);
|
buffer.append("CPP_SRCS := " + NEWLINE + NEWLINE); //$NON-NLS-1$
|
||||||
|
|
||||||
// Add the libraries this project depends on
|
// Add the libraries this project depends on
|
||||||
buffer.append("LIBS := ");
|
buffer.append("LIBS := "); //$NON-NLS-1$
|
||||||
String[] libs = info.getLibsForTarget(extension);
|
String[] libs = info.getLibsForTarget(extension);
|
||||||
for (int i = 0; i < libs.length; i++) {
|
for (int i = 0; i < libs.length; i++) {
|
||||||
String string = libs[i];
|
String string = libs[i];
|
||||||
|
@ -461,7 +461,7 @@ public class MakefileGenerator {
|
||||||
buffer.append(NEWLINE + NEWLINE);
|
buffer.append(NEWLINE + NEWLINE);
|
||||||
|
|
||||||
// Add the extra user-specified objects
|
// Add the extra user-specified objects
|
||||||
buffer.append("USER_OBJS := ");
|
buffer.append("USER_OBJS := "); //$NON-NLS-1$
|
||||||
String[] userObjs = info.getUserObjectsForTarget(extension);
|
String[] userObjs = info.getUserObjectsForTarget(extension);
|
||||||
for (int j = 0; j < userObjs.length; j++) {
|
for (int j = 0; j < userObjs.length; j++) {
|
||||||
String string = userObjs[j];
|
String string = userObjs[j];
|
||||||
|
@ -469,7 +469,7 @@ public class MakefileGenerator {
|
||||||
}
|
}
|
||||||
buffer.append(NEWLINE + NEWLINE);
|
buffer.append(NEWLINE + NEWLINE);
|
||||||
|
|
||||||
buffer.append("OBJS = $(C_SRCS:$(ROOT)/%.c=%.o) $(CC_SRCS:$(ROOT)/%.cc=%.o) $(CXX_SRCS:$(ROOT)/%.cxx=%.o) $(CAPC_SRCS:$(ROOT)/%.C=%.o) $(CPP_SRCS:$(ROOT)/%.cpp=%.o)" + NEWLINE);
|
buffer.append("OBJS = $(C_SRCS:$(ROOT)/%.c=%.o) $(CC_SRCS:$(ROOT)/%.cc=%.o) $(CXX_SRCS:$(ROOT)/%.cxx=%.o) $(CAPC_SRCS:$(ROOT)/%.C=%.o) $(CPP_SRCS:$(ROOT)/%.cpp=%.o)" + NEWLINE); //$NON-NLS-1$
|
||||||
return (buffer.append(NEWLINE));
|
return (buffer.append(NEWLINE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ public class MakefileGenerator {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
// Add the comment
|
// Add the comment
|
||||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_LIST) + NEWLINE);
|
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_LIST) + NEWLINE);
|
||||||
buffer.append("SUBDIRS := " + LINEBREAK + NEWLINE);
|
buffer.append("SUBDIRS := " + LINEBREAK + NEWLINE); //$NON-NLS-1$
|
||||||
|
|
||||||
// Get all the module names
|
// Get all the module names
|
||||||
ListIterator iter = getSubdirList().listIterator();
|
ListIterator iter = getSubdirList().listIterator();
|
||||||
|
@ -488,7 +488,7 @@ public class MakefileGenerator {
|
||||||
IContainer container = (IContainer) iter.next();
|
IContainer container = (IContainer) iter.next();
|
||||||
// Check the special case where the module is the project root
|
// Check the special case where the module is the project root
|
||||||
if (container.getFullPath() == project.getFullPath()) {
|
if (container.getFullPath() == project.getFullPath()) {
|
||||||
buffer.append("." + WHITESPACE + LINEBREAK + NEWLINE);
|
buffer.append(DOT + WHITESPACE + LINEBREAK + NEWLINE);
|
||||||
} else {
|
} else {
|
||||||
IPath path = container.getProjectRelativePath();
|
IPath path = container.getProjectRelativePath();
|
||||||
buffer.append(path.toString() + WHITESPACE + LINEBREAK + NEWLINE);
|
buffer.append(path.toString() + WHITESPACE + LINEBREAK + NEWLINE);
|
||||||
|
@ -498,11 +498,11 @@ public class MakefileGenerator {
|
||||||
// Now add the makefile instruction to include all the subdirectory makefile fragments
|
// Now add the makefile instruction to include all the subdirectory makefile fragments
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
buffer.append(COMMENT_SYMBOL +WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_INCL) + NEWLINE);
|
buffer.append(COMMENT_SYMBOL +WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_INCL) + NEWLINE);
|
||||||
buffer.append("-include ${patsubst %, %/subdir.mk, $(SUBDIRS)}" + NEWLINE);
|
buffer.append("-include ${patsubst %, %/subdir.mk, $(SUBDIRS)}" + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
|
|
||||||
// Include makefile.defs supplemental makefile
|
// Include makefile.defs supplemental makefile
|
||||||
buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_DEFS + NEWLINE);
|
buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_DEFS + NEWLINE); //$NON-NLS-1$
|
||||||
|
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
return buffer;
|
return buffer;
|
||||||
|
@ -520,20 +520,20 @@ public class MakefileGenerator {
|
||||||
// Calculate the new directory relative to the build output
|
// Calculate the new directory relative to the build output
|
||||||
IPath moduleRelativePath = module.getProjectRelativePath();
|
IPath moduleRelativePath = module.getProjectRelativePath();
|
||||||
String relativePath = moduleRelativePath.toString();
|
String relativePath = moduleRelativePath.toString();
|
||||||
relativePath += relativePath.length() == 0 ? "" : SEPARATOR;
|
relativePath += relativePath.length() == 0 ? "" : SEPARATOR; //$NON-NLS-1$
|
||||||
|
|
||||||
// String buffers
|
// String buffers
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
StringBuffer cBuffer = new StringBuffer("C_SRCS += " + LINEBREAK + NEWLINE);
|
StringBuffer cBuffer = new StringBuffer("C_SRCS += " + LINEBREAK + NEWLINE); //$NON-NLS-1$
|
||||||
cBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
|
cBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
StringBuffer ccBuffer = new StringBuffer("CC_SRCS += \\" + NEWLINE);
|
StringBuffer ccBuffer = new StringBuffer("CC_SRCS += \\" + NEWLINE); //$NON-NLS-1$
|
||||||
ccBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
|
ccBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
StringBuffer cxxBuffer = new StringBuffer("CXX_SRCS += \\" + NEWLINE);
|
StringBuffer cxxBuffer = new StringBuffer("CXX_SRCS += \\" + NEWLINE); //$NON-NLS-1$
|
||||||
cxxBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
|
cxxBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
StringBuffer capcBuffer = new StringBuffer("CAPC_SRCS += \\" + NEWLINE);
|
StringBuffer capcBuffer = new StringBuffer("CAPC_SRCS += \\" + NEWLINE); //$NON-NLS-1$
|
||||||
capcBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
|
capcBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
StringBuffer cppBuffer = new StringBuffer("CPP_SRCS += \\" + NEWLINE);
|
StringBuffer cppBuffer = new StringBuffer("CPP_SRCS += \\" + NEWLINE); //$NON-NLS-1$
|
||||||
cppBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE);
|
cppBuffer.append("${addprefix $(ROOT)/" + relativePath + "," + LINEBREAK + NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
StringBuffer ruleBuffer = new StringBuffer(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_RULES) + NEWLINE);
|
StringBuffer ruleBuffer = new StringBuffer(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(MOD_RULES) + NEWLINE);
|
||||||
|
|
||||||
// Put the comment in
|
// Put the comment in
|
||||||
|
@ -546,13 +546,13 @@ public class MakefileGenerator {
|
||||||
if (resource.getType() == IResource.FILE) {
|
if (resource.getType() == IResource.FILE) {
|
||||||
String ext = resource.getFileExtension();
|
String ext = resource.getFileExtension();
|
||||||
if (info.buildsFileType(ext)) {
|
if (info.buildsFileType(ext)) {
|
||||||
if (new String("c").equals(ext)) {
|
if (new String("c").equals(ext)) { //$NON-NLS-1$
|
||||||
cBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
cBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
||||||
} else if (new String("cc").equalsIgnoreCase(ext)) {
|
} else if (new String("cc").equalsIgnoreCase(ext)) { //$NON-NLS-1$
|
||||||
ccBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
ccBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
||||||
} else if (new String("cxx").equalsIgnoreCase(ext)) {
|
} else if (new String("cxx").equalsIgnoreCase(ext)) { //$NON-NLS-1$
|
||||||
cxxBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
cxxBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
||||||
} else if (new String("C").equals(ext)) {
|
} else if (new String("C").equals(ext)) { //$NON-NLS-1$
|
||||||
capcBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
capcBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
||||||
} else {
|
} else {
|
||||||
cppBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
cppBuffer.append(resource.getName() + WHITESPACE + LINEBREAK + NEWLINE);
|
||||||
|
@ -565,11 +565,11 @@ public class MakefileGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finish the commands in the buffers
|
// Finish the commands in the buffers
|
||||||
buffer.append(cBuffer.append("}" + NEWLINE + NEWLINE));
|
buffer.append(cBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
|
||||||
buffer.append(ccBuffer.append("}" + NEWLINE + NEWLINE));
|
buffer.append(ccBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
|
||||||
buffer.append(cxxBuffer.append("}" + NEWLINE + NEWLINE));
|
buffer.append(cxxBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
|
||||||
buffer.append(capcBuffer.append("}" + NEWLINE + NEWLINE));
|
buffer.append(capcBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
|
||||||
buffer.append(cppBuffer.append("}" + NEWLINE + NEWLINE));
|
buffer.append(cppBuffer.append("}" + NEWLINE + NEWLINE)); //$NON-NLS-1$
|
||||||
|
|
||||||
return buffer.append(ruleBuffer + NEWLINE);
|
return buffer.append(ruleBuffer + NEWLINE);
|
||||||
}
|
}
|
||||||
|
@ -588,7 +588,7 @@ public class MakefileGenerator {
|
||||||
String flags = info.getFlagsForTarget(extension);
|
String flags = info.getFlagsForTarget(extension);
|
||||||
String outflag = info.getOutputFlag(extension);
|
String outflag = info.getOutputFlag(extension);
|
||||||
String outputPrefix = info.getOutputPrefix(extension);
|
String outputPrefix = info.getOutputPrefix(extension);
|
||||||
String targets = rebuild ? "clean all" : "all";
|
String targets = rebuild ? "clean all" : "all"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
||||||
// Get all the projects the build target depends on
|
// Get all the projects the build target depends on
|
||||||
IProject[] deps = null;
|
IProject[] deps = null;
|
||||||
|
@ -601,9 +601,9 @@ public class MakefileGenerator {
|
||||||
|
|
||||||
// Write out the all target first in case someone just runs make
|
// Write out the all target first in case someone just runs make
|
||||||
// all: targ_<target_name> [deps]
|
// all: targ_<target_name> [deps]
|
||||||
String defaultTarget = "all:";
|
String defaultTarget = "all:"; //$NON-NLS-1$
|
||||||
if (deps.length > 0) {
|
if (deps.length > 0) {
|
||||||
defaultTarget += WHITESPACE + "deps";
|
defaultTarget += WHITESPACE + "deps"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
buffer.append(defaultTarget + WHITESPACE + outputPrefix + target);
|
buffer.append(defaultTarget + WHITESPACE + outputPrefix + target);
|
||||||
if (extension.length() > 0) {
|
if (extension.length() > 0) {
|
||||||
|
@ -619,7 +619,7 @@ public class MakefileGenerator {
|
||||||
*/
|
*/
|
||||||
List managedProjectOutputs = new ArrayList();
|
List managedProjectOutputs = new ArrayList();
|
||||||
if (deps.length > 0) {
|
if (deps.length > 0) {
|
||||||
buffer.append("deps:" + NEWLINE);
|
buffer.append("deps:" + NEWLINE); //$NON-NLS-1$
|
||||||
if (deps != null) {
|
if (deps != null) {
|
||||||
for (int i = 0; i < deps.length; i++) {
|
for (int i = 0; i < deps.length; i++) {
|
||||||
IProject dep = deps[i];
|
IProject dep = deps[i];
|
||||||
|
@ -635,7 +635,7 @@ public class MakefileGenerator {
|
||||||
String depExt = depInfo.getBuildArtifactExtension();
|
String depExt = depInfo.getBuildArtifactExtension();
|
||||||
String depPrefix = depInfo.getOutputPrefix(depExt);
|
String depPrefix = depInfo.getOutputPrefix(depExt);
|
||||||
if (depInfo.isDirty()) {
|
if (depInfo.isDirty()) {
|
||||||
depTargets = "clean all";
|
depTargets = "clean all"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
String dependency = buildDir + SEPARATOR + depPrefix + depTarget;
|
String dependency = buildDir + SEPARATOR + depPrefix + depTarget;
|
||||||
if (depExt.length() > 0) {
|
if (depExt.length() > 0) {
|
||||||
|
@ -643,7 +643,7 @@ public class MakefileGenerator {
|
||||||
}
|
}
|
||||||
managedProjectOutputs.add(dependency);
|
managedProjectOutputs.add(dependency);
|
||||||
}
|
}
|
||||||
buffer.append(TAB + "-cd" + WHITESPACE + buildDir + WHITESPACE + LOGICAL_AND + WHITESPACE + "$(MAKE) " + depTargets + NEWLINE);
|
buffer.append(TAB + "-cd" + WHITESPACE + buildDir + WHITESPACE + LOGICAL_AND + WHITESPACE + "$(MAKE) " + depTargets + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
|
@ -658,27 +658,27 @@ public class MakefileGenerator {
|
||||||
if (extension.length() > 0) {
|
if (extension.length() > 0) {
|
||||||
buffer.append(DOT + extension);
|
buffer.append(DOT + extension);
|
||||||
}
|
}
|
||||||
buffer.append(COLON + WHITESPACE + "$(OBJS)");
|
buffer.append(COLON + WHITESPACE + "$(OBJS)"); //$NON-NLS-1$
|
||||||
Iterator iter = managedProjectOutputs.listIterator();
|
Iterator iter = managedProjectOutputs.listIterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
buffer.append(WHITESPACE + (String)iter.next());
|
buffer.append(WHITESPACE + (String)iter.next());
|
||||||
}
|
}
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
buffer.append(TAB + cmd + WHITESPACE + flags + WHITESPACE + outflag + WHITESPACE + "$@" + WHITESPACE + "$(OBJS) $(USER_OBJS) $(LIBS)");
|
buffer.append(TAB + cmd + WHITESPACE + flags + WHITESPACE + outflag + WHITESPACE + "$@" + WHITESPACE + "$(OBJS) $(USER_OBJS) $(LIBS)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
buffer.append(NEWLINE + NEWLINE);
|
buffer.append(NEWLINE + NEWLINE);
|
||||||
|
|
||||||
// Always add a clean target
|
// Always add a clean target
|
||||||
buffer.append("clean:" + NEWLINE);
|
buffer.append("clean:" + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append(TAB + "-$(RM)" + WHITESPACE + "$(OBJS)" + WHITESPACE + outputPrefix + target + NEWLINE + NEWLINE);
|
buffer.append(TAB + "-$(RM)" + WHITESPACE + "$(OBJS)" + WHITESPACE + outputPrefix + target + NEWLINE + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
||||||
buffer.append(".PHONY: all clean deps" + NEWLINE + NEWLINE);
|
buffer.append(".PHONY: all clean deps" + NEWLINE + NEWLINE); //$NON-NLS-1$
|
||||||
|
|
||||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(DEP_INCL) + NEWLINE);
|
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedBuilderCorePlugin.getResourceString(DEP_INCL) + NEWLINE);
|
||||||
buffer.append("-include ${patsubst %, %/subdir.dep, $(SUBDIRS)}" + NEWLINE);
|
buffer.append("-include ${patsubst %, %/subdir.dep, $(SUBDIRS)}" + NEWLINE); //$NON-NLS-1$
|
||||||
buffer.append(NEWLINE);
|
buffer.append(NEWLINE);
|
||||||
|
|
||||||
// Include makefile.targets supplemental makefile
|
// Include makefile.targets supplemental makefile
|
||||||
buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_TARGETS + NEWLINE);
|
buffer.append("-include $(ROOT)" + SEPARATOR + MAKEFILE_TARGETS + NEWLINE); //$NON-NLS-1$
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
@ -717,7 +717,7 @@ public class MakefileGenerator {
|
||||||
* source1/%.o: $(ROOT)/source1/%.cpp
|
* source1/%.o: $(ROOT)/source1/%.cpp
|
||||||
* g++ -g -O2 -c -I/cygdrive/c/eclipse/workspace/Project/headers -o $@ $<
|
* g++ -g -O2 -c -I/cygdrive/c/eclipse/workspace/Project/headers -o $@ $<
|
||||||
*/
|
*/
|
||||||
rule = relativePath + WILDCARD + DOT + outputExtension + COLON + WHITESPACE + "$(ROOT)" + SEPARATOR + relativePath + WILDCARD + DOT + inputExtension;
|
rule = relativePath + WILDCARD + DOT + outputExtension + COLON + WHITESPACE + "$(ROOT)" + SEPARATOR + relativePath + WILDCARD + DOT + inputExtension; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the rule is listed as something we already generated in the makefile
|
// Check if the rule is listed as something we already generated in the makefile
|
||||||
|
@ -731,7 +731,7 @@ public class MakefileGenerator {
|
||||||
buildFlags = info.getFlagsForSource(inputExtension);
|
buildFlags = info.getFlagsForSource(inputExtension);
|
||||||
outflag = info.getOutputFlag(outputExtension);
|
outflag = info.getOutputFlag(outputExtension);
|
||||||
outputPrefix = info.getOutputPrefix(outputExtension);
|
outputPrefix = info.getOutputPrefix(outputExtension);
|
||||||
buffer.append(TAB + cmd + WHITESPACE + buildFlags + WHITESPACE + outflag + WHITESPACE + outputPrefix + "$@" + WHITESPACE + "$<" + NEWLINE + NEWLINE);
|
buffer.append(TAB + cmd + WHITESPACE + buildFlags + WHITESPACE + outflag + WHITESPACE + outputPrefix + "$@" + WHITESPACE + "$<" + NEWLINE + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,13 +74,13 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
String defaultTargetId = null;
|
String defaultTargetId = null;
|
||||||
List configIds = new ArrayList();
|
List configIds = new ArrayList();
|
||||||
while (child != null) {
|
while (child != null) {
|
||||||
if (child.getNodeName().equals("target")) {
|
if (child.getNodeName().equals(ITarget.TARGET_ELEMENT_NAME)) {
|
||||||
new Target(this, (Element)child);
|
new Target(this, (Element)child);
|
||||||
} else if (child.getNodeName().equals("defaultConfig")) {
|
} else if (child.getNodeName().equals(DEFAULT_CONFIGURATION)) {
|
||||||
// We may not have read the config in yet, so just cache it
|
// We may not have read the config in yet, so just cache it
|
||||||
configIds.add(((Element)child).getAttribute("id"));
|
configIds.add(((Element)child).getAttribute(IConfiguration.ID));
|
||||||
} else if (child.getNodeName().equals("defaultTarget")) {
|
} else if (child.getNodeName().equals(DEFAULT_TARGET)) {
|
||||||
defaultTargetId = ((Element)child).getAttribute("id");
|
defaultTargetId = ((Element)child).getAttribute(ITarget.ID);
|
||||||
}
|
}
|
||||||
child = child.getNextSibling();
|
child = child.getNextSibling();
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
}
|
}
|
||||||
String key = new String();
|
String key = new String();
|
||||||
String value = new String();
|
String value = new String();
|
||||||
int index = symbol.indexOf("=");
|
int index = symbol.indexOf("="); //$NON-NLS-1$
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
key = symbol.substring(0, index).trim();
|
key = symbol.substring(0, index).trim();
|
||||||
value = symbol.substring(index + 1).trim();
|
value = symbol.substring(index + 1).trim();
|
||||||
|
@ -392,7 +392,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
IPath location = owner.getLocation();
|
IPath location = owner.getLocation();
|
||||||
// If the build info is out of date this might be null
|
// If the build info is out of date this might be null
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
location = new Path(".");
|
location = new Path("."); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
IPath root = location.addTrailingSeparator().append(config.getName());
|
IPath root = location.addTrailingSeparator().append(config.getName());
|
||||||
ITool[] tools = config.getTools();
|
ITool[] tools = config.getTools();
|
||||||
|
@ -824,21 +824,21 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
public void serialize(Document doc, Element element) {
|
public void serialize(Document doc, Element element) {
|
||||||
// Write out each target and their default config
|
// Write out each target and their default config
|
||||||
for (int i = 0; i < targets.size(); ++i) {
|
for (int i = 0; i < targets.size(); ++i) {
|
||||||
Element targetElement = doc.createElement("target");
|
Element targetElement = doc.createElement(ITarget.TARGET_ELEMENT_NAME);
|
||||||
element.appendChild(targetElement);
|
element.appendChild(targetElement);
|
||||||
((Target)targets.get(i)).serialize(doc, targetElement);
|
((Target)targets.get(i)).serialize(doc, targetElement);
|
||||||
IConfiguration config = getDefaultConfiguration((ITarget)targets.get(i));
|
IConfiguration config = getDefaultConfiguration((ITarget)targets.get(i));
|
||||||
if (config != null) {
|
if (config != null) {
|
||||||
Element configEl = doc.createElement("defaultConfig");
|
Element configEl = doc.createElement(DEFAULT_CONFIGURATION);
|
||||||
element.appendChild(configEl);
|
element.appendChild(configEl);
|
||||||
configEl.setAttribute("id", config.getId());
|
configEl.setAttribute(IConfiguration.ID, config.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Persist the default target
|
// Persist the default target
|
||||||
if (getDefaultTarget() != null){
|
if (getDefaultTarget() != null){
|
||||||
Element targEl = doc.createElement("defaultTarget");
|
Element targEl = doc.createElement(DEFAULT_TARGET);
|
||||||
element.appendChild(targEl);
|
element.appendChild(targEl);
|
||||||
targEl.setAttribute("id", getDefaultTarget().getId());
|
targEl.setAttribute(ITarget.ID, getDefaultTarget().getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
|
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ITool;
|
import org.eclipse.cdt.managedbuilder.core.ITool;
|
||||||
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
|
|
||||||
public class Option extends BuildObject implements IOption {
|
public class Option extends BuildObject implements IOption {
|
||||||
|
@ -178,7 +179,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
*/
|
*/
|
||||||
public String[] getDefinedSymbols() throws BuildException {
|
public String[] getDefinedSymbols() throws BuildException {
|
||||||
if (valueType != PREPROCESSOR_SYMBOLS) {
|
if (valueType != PREPROCESSOR_SYMBOLS) {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
ArrayList v = (ArrayList)value;
|
ArrayList v = (ArrayList)value;
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
|
@ -202,7 +203,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
*/
|
*/
|
||||||
public String[] getIncludePaths() throws BuildException {
|
public String[] getIncludePaths() throws BuildException {
|
||||||
if (valueType != INCLUDE_PATH) {
|
if (valueType != INCLUDE_PATH) {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
ArrayList v = (ArrayList)value;
|
ArrayList v = (ArrayList)value;
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
|
@ -218,7 +219,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
*/
|
*/
|
||||||
public String[] getLibraries() throws BuildException {
|
public String[] getLibraries() throws BuildException {
|
||||||
if (valueType != LIBRARIES) {
|
if (valueType != LIBRARIES) {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
ArrayList v = (ArrayList)value;
|
ArrayList v = (ArrayList)value;
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
|
@ -234,7 +235,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
*/
|
*/
|
||||||
public String getSelectedEnum() throws BuildException {
|
public String getSelectedEnum() throws BuildException {
|
||||||
if (valueType != ENUMERATED) {
|
if (valueType != ENUMERATED) {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
return defaultEnumName == null ? EMPTY_STRING : defaultEnumName;
|
return defaultEnumName == null ? EMPTY_STRING : defaultEnumName;
|
||||||
}
|
}
|
||||||
|
@ -244,7 +245,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
*/
|
*/
|
||||||
public String[] getStringListValue() throws BuildException {
|
public String[] getStringListValue() throws BuildException {
|
||||||
if (valueType != STRING_LIST) {
|
if (valueType != STRING_LIST) {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
ArrayList v = (ArrayList)value;
|
ArrayList v = (ArrayList)value;
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
|
@ -260,7 +261,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
*/
|
*/
|
||||||
public String getStringValue() throws BuildException {
|
public String getStringValue() throws BuildException {
|
||||||
if (valueType != STRING) {
|
if (valueType != STRING) {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
return value == null ? EMPTY_STRING : (String)value;
|
return value == null ? EMPTY_STRING : (String)value;
|
||||||
}
|
}
|
||||||
|
@ -277,7 +278,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
*/
|
*/
|
||||||
public String[] getUserObjects() throws BuildException {
|
public String[] getUserObjects() throws BuildException {
|
||||||
if (valueType != OBJECTS) {
|
if (valueType != OBJECTS) {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
// This is the right puppy, so return its list value
|
// This is the right puppy, so return its list value
|
||||||
ArrayList v = (ArrayList)value;
|
ArrayList v = (ArrayList)value;
|
||||||
|
@ -311,7 +312,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
{
|
{
|
||||||
if (valueType != IOption.STRING
|
if (valueType != IOption.STRING
|
||||||
|| valueType != ENUMERATED)
|
|| valueType != ENUMERATED)
|
||||||
throw new BuildException("Bad value for type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
|
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
@ -333,7 +334,7 @@ public class Option extends BuildObject implements IOption {
|
||||||
|| valueType != PREPROCESSOR_SYMBOLS
|
|| valueType != PREPROCESSOR_SYMBOLS
|
||||||
|| valueType != LIBRARIES
|
|| valueType != LIBRARIES
|
||||||
|| valueType != OBJECTS)
|
|| valueType != OBJECTS)
|
||||||
throw new BuildException("Bad value for type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
|
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|
|
@ -19,6 +19,7 @@ import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
|
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ITool;
|
import org.eclipse.cdt.managedbuilder.core.ITool;
|
||||||
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
|
@ -190,7 +191,7 @@ public class OptionReference implements IOption {
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Element valueElement = doc.createElement(LIST_VALUE);
|
Element valueElement = doc.createElement(LIST_VALUE);
|
||||||
valueElement.setAttribute(LIST_ITEM_VALUE, (String)iter.next());
|
valueElement.setAttribute(LIST_ITEM_VALUE, (String)iter.next());
|
||||||
valueElement.setAttribute(LIST_ITEM_BUILTIN, "false");
|
valueElement.setAttribute(LIST_ITEM_BUILTIN, "false"); //$NON-NLS-1$
|
||||||
element.appendChild(valueElement);
|
element.appendChild(valueElement);
|
||||||
}
|
}
|
||||||
// Serialize the built-ins that have been overridden
|
// Serialize the built-ins that have been overridden
|
||||||
|
@ -199,7 +200,7 @@ public class OptionReference implements IOption {
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Element valueElement = doc.createElement(LIST_VALUE);
|
Element valueElement = doc.createElement(LIST_VALUE);
|
||||||
valueElement.setAttribute(LIST_ITEM_VALUE, (String)iter.next());
|
valueElement.setAttribute(LIST_ITEM_VALUE, (String)iter.next());
|
||||||
valueElement.setAttribute(LIST_ITEM_BUILTIN, "true");
|
valueElement.setAttribute(LIST_ITEM_BUILTIN, "true"); //$NON-NLS-1$
|
||||||
element.appendChild(valueElement);
|
element.appendChild(valueElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,7 +240,7 @@ public class OptionReference implements IOption {
|
||||||
return (String[]) list.toArray(new String[list.size()]);
|
return (String[]) list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -268,7 +269,7 @@ public class OptionReference implements IOption {
|
||||||
return (String[]) list.toArray(new String[list.size()]);
|
return (String[]) list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -282,7 +283,7 @@ public class OptionReference implements IOption {
|
||||||
return (String[]) list.toArray(new String[list.size()]);
|
return (String[]) list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -304,7 +305,7 @@ public class OptionReference implements IOption {
|
||||||
Boolean bool = (Boolean) value;
|
Boolean bool = (Boolean) value;
|
||||||
return bool.booleanValue();
|
return bool.booleanValue();
|
||||||
} else {
|
} else {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,7 +335,7 @@ public class OptionReference implements IOption {
|
||||||
// Value will contain the human-readable name of the enum
|
// Value will contain the human-readable name of the enum
|
||||||
return (String) value;
|
return (String) value;
|
||||||
} else {
|
} else {
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,7 +350,7 @@ public class OptionReference implements IOption {
|
||||||
return (String[]) list.toArray(new String[list.size()]);
|
return (String[]) list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -361,7 +362,7 @@ public class OptionReference implements IOption {
|
||||||
else if (getValueType() == STRING)
|
else if (getValueType() == STRING)
|
||||||
return (String)value;
|
return (String)value;
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -391,7 +392,7 @@ public class OptionReference implements IOption {
|
||||||
return (String[]) list.toArray(new String[list.size()]);
|
return (String[]) list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -433,7 +434,7 @@ public class OptionReference implements IOption {
|
||||||
if (getValueType() == BOOLEAN)
|
if (getValueType() == BOOLEAN)
|
||||||
this.value = new Boolean(value);
|
this.value = new Boolean(value);
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -444,7 +445,7 @@ public class OptionReference implements IOption {
|
||||||
if (getValueType() == STRING || getValueType() == ENUMERATED)
|
if (getValueType() == STRING || getValueType() == ENUMERATED)
|
||||||
this.value = value;
|
this.value = value;
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -463,7 +464,7 @@ public class OptionReference implements IOption {
|
||||||
this.value = new ArrayList(Arrays.asList(value));
|
this.value = new ArrayList(Arrays.asList(value));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new BuildException("bad value type");
|
throw new BuildException(ManagedBuilderCorePlugin.getResourceString("Option.error.bad_value_type")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,4 +25,12 @@ ManagedMakeBuilder.comment.build.rule = Each subdirectory must supply rules for
|
||||||
ManagedMakeBuilder.comment.module.make.includes = Include the makefiles for each source subdirectory
|
ManagedMakeBuilder.comment.module.make.includes = Include the makefiles for each source subdirectory
|
||||||
ManagedMakeBuilder.comment.module.dep.includes = Include automatically-generated dependency list:
|
ManagedMakeBuilder.comment.module.dep.includes = Include automatically-generated dependency list:
|
||||||
ManagedMakeBuilder.comment.autodeps = Automatically-generated dependency list:
|
ManagedMakeBuilder.comment.autodeps = Automatically-generated dependency list:
|
||||||
ManagedMakeBuilder.comment.header = Automatically-generated file. Do not edit!
|
ManagedMakeBuilder.comment.header = Automatically-generated file. Do not edit!
|
||||||
|
|
||||||
|
# Option exception messages
|
||||||
|
Option.error.bad_value_type=Bad value for type
|
||||||
|
|
||||||
|
# Managed build manager exception messages
|
||||||
|
ManagedBuildManager.error.owner_not_null=addTarget: owner not null
|
||||||
|
ManagedBuildManager.error.null_owner=addTarget: null owner
|
||||||
|
ManagedBuildManager.error.owner_not_project=addTarget: owner not project
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class Target extends BuildObject implements ITarget {
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
id *= -1;
|
id *= -1;
|
||||||
}
|
}
|
||||||
setId(owner.getName() + "." + parent.getId() + "." + id);
|
setId(owner.getName() + "." + parent.getId() + "." + id); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
setName(parent.getName());
|
setName(parent.getName());
|
||||||
this.artifactName = parent.getArtifactName();
|
this.artifactName = parent.getArtifactName();
|
||||||
this.binaryParserId = parent.getBinaryParserId();
|
this.binaryParserId = parent.getBinaryParserId();
|
||||||
|
@ -133,10 +133,10 @@ public class Target extends BuildObject implements ITarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
// isAbstract
|
// isAbstract
|
||||||
isAbstract = ("true".equals(element.getAttribute(IS_ABSTRACT)));
|
isAbstract = ("true".equals(element.getAttribute(IS_ABSTRACT))); //$NON-NLS-1$
|
||||||
|
|
||||||
// Is this a test target
|
// Is this a test target
|
||||||
isTest = ("true".equals(element.getAttribute(IS_TEST)));
|
isTest = ("true".equals(element.getAttribute(IS_TEST))); //$NON-NLS-1$
|
||||||
|
|
||||||
// Get the clean command
|
// Get the clean command
|
||||||
cleanCommand = element.getAttribute(CLEAN_COMMAND);
|
cleanCommand = element.getAttribute(CLEAN_COMMAND);
|
||||||
|
@ -148,7 +148,7 @@ public class Target extends BuildObject implements ITarget {
|
||||||
String os = element.getAttribute(OS_LIST);
|
String os = element.getAttribute(OS_LIST);
|
||||||
if (os != null) {
|
if (os != null) {
|
||||||
targetOSList = new ArrayList();
|
targetOSList = new ArrayList();
|
||||||
StringTokenizer tokens = new StringTokenizer(os, ",");
|
StringTokenizer tokens = new StringTokenizer(os, ","); //$NON-NLS-1$
|
||||||
while (tokens.hasMoreTokens()) {
|
while (tokens.hasMoreTokens()) {
|
||||||
targetOSList.add(tokens.nextToken().trim());
|
targetOSList.add(tokens.nextToken().trim());
|
||||||
}
|
}
|
||||||
|
@ -204,11 +204,11 @@ public class Target extends BuildObject implements ITarget {
|
||||||
parent = ManagedBuildManager.getTarget(null, parentId);
|
parent = ManagedBuildManager.getTarget(null, parentId);
|
||||||
|
|
||||||
// isAbstract
|
// isAbstract
|
||||||
if ("true".equals(element.getAttribute(IS_ABSTRACT)))
|
if ("true".equals(element.getAttribute(IS_ABSTRACT))) //$NON-NLS-1$
|
||||||
isAbstract = true;
|
isAbstract = true;
|
||||||
|
|
||||||
// Is this a test target
|
// Is this a test target
|
||||||
isTest = ("true".equals(element.getAttribute(IS_TEST)));
|
isTest = ("true".equals(element.getAttribute(IS_TEST))); //$NON-NLS-1$
|
||||||
|
|
||||||
// Get the clean command
|
// Get the clean command
|
||||||
cleanCommand = element.getAttribute(CLEAN_COMMAND);
|
cleanCommand = element.getAttribute(CLEAN_COMMAND);
|
||||||
|
@ -265,12 +265,12 @@ public class Target extends BuildObject implements ITarget {
|
||||||
element.setAttribute(NAME, getName());
|
element.setAttribute(NAME, getName());
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
element.setAttribute(PARENT, parent.getId());
|
element.setAttribute(PARENT, parent.getId());
|
||||||
element.setAttribute(IS_ABSTRACT, isAbstract ? "true" : "false");
|
element.setAttribute(IS_ABSTRACT, isAbstract ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
element.setAttribute(ARTIFACT_NAME, getArtifactName());
|
element.setAttribute(ARTIFACT_NAME, getArtifactName());
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
element.setAttribute(EXTENSION, extension);
|
element.setAttribute(EXTENSION, extension);
|
||||||
}
|
}
|
||||||
element.setAttribute(IS_TEST, isTest ? "true" : "false");
|
element.setAttribute(IS_TEST, isTest ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
element.setAttribute(CLEAN_COMMAND, getCleanCommand());
|
element.setAttribute(CLEAN_COMMAND, getCleanCommand());
|
||||||
if (makeCommand != null) {
|
if (makeCommand != null) {
|
||||||
element.setAttribute(MAKE_COMMAND, makeCommand);
|
element.setAttribute(MAKE_COMMAND, makeCommand);
|
||||||
|
@ -312,7 +312,7 @@ public class Target extends BuildObject implements ITarget {
|
||||||
return parent.getMakeArguments();
|
return parent.getMakeArguments();
|
||||||
} else {
|
} else {
|
||||||
// No parent and no user setting
|
// No parent and no user setting
|
||||||
return new String("");
|
return new String(""); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return makeArguments;
|
return makeArguments;
|
||||||
|
@ -329,7 +329,7 @@ public class Target extends BuildObject implements ITarget {
|
||||||
return parent.getMakeCommand();
|
return parent.getMakeCommand();
|
||||||
} else {
|
} else {
|
||||||
// The user has forgotten to specify a command in the plugin manifets.
|
// The user has forgotten to specify a command in the plugin manifets.
|
||||||
return new String("make");
|
return new String("make"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return makeCommand;
|
return makeCommand;
|
||||||
|
@ -534,10 +534,10 @@ public class Target extends BuildObject implements ITarget {
|
||||||
return parent.getCleanCommand();
|
return parent.getCleanCommand();
|
||||||
} else {
|
} else {
|
||||||
// User forgot to specify it. Guess based on OS.
|
// User forgot to specify it. Guess based on OS.
|
||||||
if (BootLoader.getOS().equals("OS_WIN32")) {
|
if (BootLoader.getOS().equals("OS_WIN32")) { //$NON-NLS-1$
|
||||||
return new String("del");
|
return new String("del"); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
return new String("rm");
|
return new String("rm"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
*/
|
*/
|
||||||
public class Tool extends BuildObject implements ITool, IOptionCategory {
|
public class Tool extends BuildObject implements ITool, IOptionCategory {
|
||||||
|
|
||||||
private static final String DEFAULT_SEPARATOR = ",";
|
private static final String DEFAULT_SEPARATOR = ","; //$NON-NLS-1$
|
||||||
private static final IOptionCategory[] EMPTY_CATEGORIES = new IOptionCategory[0];
|
private static final IOptionCategory[] EMPTY_CATEGORIES = new IOptionCategory[0];
|
||||||
private static final IOption[] EMPTY_OPTIONS = new IOption[0];
|
private static final IOption[] EMPTY_OPTIONS = new IOption[0];
|
||||||
|
|
||||||
|
@ -337,11 +337,11 @@ public class Tool extends BuildObject implements ITool, IOptionCategory {
|
||||||
|
|
||||||
// Get the nature filter
|
// Get the nature filter
|
||||||
String nature = element.getAttribute(NATURE);
|
String nature = element.getAttribute(NATURE);
|
||||||
if (nature == null || "both".equals(nature)) {
|
if (nature == null || "both".equals(nature)) { //$NON-NLS-1$
|
||||||
natureFilter = FILTER_BOTH;
|
natureFilter = FILTER_BOTH;
|
||||||
} else if ("cnature".equals(nature)) {
|
} else if ("cnature".equals(nature)) { //$NON-NLS-1$
|
||||||
natureFilter = FILTER_C;
|
natureFilter = FILTER_C;
|
||||||
} else if ("ccnature".equals(nature)) {
|
} else if ("ccnature".equals(nature)) { //$NON-NLS-1$
|
||||||
natureFilter = FILTER_CC;
|
natureFilter = FILTER_CC;
|
||||||
} else {
|
} else {
|
||||||
natureFilter = FILTER_BOTH;
|
natureFilter = FILTER_BOTH;
|
||||||
|
|
Loading…
Add table
Reference in a new issue